wheelybird / openvpn-server-ldap-otp

A dockerised OpenVPN server using LDAP for authentication, with optional 2FA via Google Authenticator
MIT License
168 stars 72 forks source link

Network unreachable #68

Open zhengshaoyong opened 1 year ago

zhengshaoyong commented 1 year ago

docker run \ --privileged \ --name openvpn \ --volume /opt/data/openvpn:/etc/openvpn \ --detach=true \ -p 1194:1194/udp \ -e "OVPN_SERVER_CN=myserver.mycompany.com" \ -e "LDAP_URI=ldap://xxxx" \ -e "LDAP_BASE_DN=ou=" \ -e "LDAP_BIND_USER_DN=cn=xxx" \ -e "LDAP_BIND_USER_PASS=xxx" \ --cap-add=NET_ADMIN \ -e OVPN_NAT=true \ -e OVPN_ROUTES="172.16.64.0 255.255.255.0" \ wheelybird/openvpn-ldap-otp:v1.7

VPN connection is okay, unable to access VPN intranet.

Test results:

  1. Ping Docker container IP is normal

  2. Ping Docker 172.17.0.1 doesn't work

  3. Ping Docker host IP is also not available

wheelybird commented 1 year ago

The Docker IPs wouldn't be covered by the route you've added (172.16.64.0/24). Try not adding the route and see if you can connect without it.