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

Having trouble establishing connection to server #662

Open spacecowboyx opened 2 years ago

spacecowboyx commented 2 years ago

I set up the container using compose and followed instructions. Container is running but when I create my client certificate and try to connect using it the connection always times out. The logs from the container do not register any attempted connections. I forwarded 1194 in my router but I get nothing.

Got this to work before a couple weeks ago then it stopped for some reason.

Here is my openvpn.conf

verb 3 key /etc/openvpn/pki/private/baushaus.synology.me.key ca /etc/openvpn/pki/ca.crt cert /etc/openvpn/pki/issued/baushaus.synology.me.crt dh /etc/openvpn/pki/dh.pem tls-auth /etc/openvpn/pki/ta.key key-direction 0 keepalive 10 60 persist-key persist-tun

proto udp

Rely on Docker to do port mapping, internally always 1194

port 1194 dev tun0 status /tmp/openvpn-status.log

user nobody group nogroup comp-lzo no

Route Configurations Below

route 192.168.254.0 255.255.255.0

Push Configurations Below

push "block-outside-dns" push "dhcp-option DNS 8.8.8.8" push "dhcp-option DNS 8.8.4.4" push "comp-lzo no"`

zhanzhen-sh commented 2 years ago

met same issue, the network is ok, nc -vuz 47.xxx.xxx.x14 1194 work well image

spacecowboyx commented 2 years ago

Did you find a fix? It looks like yours shows actual connections attempted but mine doesn't even do that. You're using a static IP also but I'm using ddns