Conversation
|
to be elaborate: just run docker container and connect to the access point, no reboot needed |
|
This is great, no manual steps in the dockerfile is ideal. We can bake in the contents of the RaspAP install script so we always have a known-good image digest. |
|
@jrcichra what do you think of adding the masquerading rules to the dockerfile? so it is a truely onehit run: *by masquerading rules i mean: iptables -I DOCKER-USER -i src_if -o dst_if -j ACCEPT
iptables -t nat -C POSTROUTING -o eth0 -j MASQUERADE || iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
iptables -C FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT || iptables -A FORWARD -i eth0 -o wlan0 -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -C FORWARD -i wlan0 -o eth0 -j ACCEPT || iptables -A FORWARD -i wlan0 -o eth0 -j ACCEPT
iptables-save |
|
I'm in favor of this as I believe it covers most users' setups. We can add a mention in the readme to modify these rules for interfaces other than eth0/wlan0. |
|
Agreed. Though it will need to be executed at container runtime, not at container build time. |
|
why is that? i think it would work at build time |
|
|
|
you are completely right @jrcichra |
| ## Workaround for arm devices | ||
| To use this container on arm devices you have to make cgroups writable: | ||
| ``` | ||
| docker run --name raspap -it -d --privileged --network=host --cgroupns=host -v /sys/fs/cgroup:/sys/fs/cgroup:rw --cap-add SYS_ADMIN jrcichra/raspap-docker |
There was a problem hiding this comment.
Should we just make the default usage include the writable cgroups and remove this workaround section?
There was a problem hiding this comment.
i think we should keep it as a workaround. Because this has some serious security consequences. normally with an innocent process this is no harm, but with an accesspoint/vpnclient/simple-router this is not ideal.
https://www.nginx.com/blog/what-are-namespaces-cgroups-how-do-they-work/
this workaround only applies to ARM devices if i am right
|
added the firewall autoconfig, i cannot test this, because i am not home this week, can you guys build and test this one? |
|
hey guys, can you guys merge the two PR's so i can create a new one for a docker-compose example? no rush ofc! |
|
@NL-TCH sure, no problem. we're close to having this buttoned up (and the bounty in your pocket) |
|
Ran through a post-merge build. According to the container logs, the Restarting the container produces the same result. |
|
I'm not at home but can you paste the output of |
|
Sure thing. Here you go... |
Hey, with this updated dockerfile there are no manual steps involved anymore.
Now after running the container raspap is already installed with all features (wireguard,openvpn,adblock) installed.
No manual setup to be run + no manual reboot to be done
This because if for example openvpn is not needed, there is no harm in having it installed :)