xptsp / pivpn-docker

Run PiVPN in a Container!
MIT License
8 stars 5 forks source link

Can't initialize iptables #2

Open Insomniacnomis opened 3 years ago

Insomniacnomis commented 3 years ago

I'm quite a noob here, so I don't really know how to ask stuff here.

I setted up the docker container, and it's running onto some errors, which are: iptables v1.6.1: can't initialize iptables table `nat': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded.

It tries a couple of times, then the container goes to stop It's strange is asking for root permission, since it should already have root permissions inside de container, right?

xptsp commented 3 years ago

You need to have the privileged flag and network mode set to host in order to use this container. Otherwise, the Docker container doesn't have the necessary privledges to do its thing...