Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
guohuoyong opened this issue Jun 14, 2024 · 1 comment

Comments

@guohuoyong
Copy link

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

@neofob
Copy link

neofob commented Sep 5, 2024

You might want to load the kernel module iptable_nat

modprobe iptable_nat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants