kylemanna / docker-openvpn

🔒 OpenVPN server in a Docker container complete with an EasyRSA PKI CA
https://hub.docker.com/r/kylemanna/openvpn/
MIT License
8.62k stars 2.37k forks source link

Cannot start service #650

Open jaybauson opened 3 years ago

jaybauson commented 3 years ago

I enabled the DEBUG mode since the service isn't running. Does anyone know how to fix this issue? `+ iptables -t nat -C POSTROUTING -s 192.168.255.0/24 -o eth0 -j MASQUERADE

DanielVukelich commented 2 years ago

I also have this issue. Container is connected to a macvlan network if that makes a difference.

Edit: I found my solution here: https://github.com/kylemanna/docker-openvpn/issues/564. Seems to be related to Centos 8 (which my host machine is running).

KruseCarsten commented 2 years ago

I had to add the "mknod" to --cap-add as followed:

--cap-add=NET_ADMIN,mknod

Furthermore, on my system (CentOS / RockyLinux) I had to run the following on the host:

sudo modprobe iptable_filter
sudo modprobe iptable_nat
robertpro commented 2 years ago

@BKhenloo fix worked for me, thanks!