docker-openvpn icon indicating copy to clipboard operation
docker-openvpn copied to clipboard

OpenVpn container not starting and giving Iptables errors in Centos 8 host

Open guohuoyong opened this issue 1 year ago • 1 comments

Here is the command I am using: docker run --privileged -v $OVPN_DATA:/etc/openvpn -d -p 1194:1194/udp --cap-add=NET_ADMIN --cap-add=NET_RAW --name openvpn kylemanna/openvpn:2.4

The error information is as follows:

$sudo docker logs -f 45e39f719235f2377a719732e2b920c6ca25758dfcdfcec8f9ef3ef9526d894d modprobe: can't change directory to '/lib/modules': No such file or directory modprobe: can't change directory to '/lib/modules': No such file or directory iptables v1.8.4 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?) Perhaps iptables or your kernel needs to be upgraded.

My docker is installed on centos 8.

$ lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: CentOSStream Description: CentOS Stream release 8 Release: 8 Codename: n/a

Can someone help?

Thanks

guohuoyong avatar Jun 14 '24 08:06 guohuoyong

You might want to load the kernel module iptable_nat

modprobe iptable_nat

neofob avatar Sep 05 '24 06:09 neofob