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.77k stars 2.39k forks source link

CLIENT.ovpn for linux ubuntu needs extra config to work #196

Open danoctavian opened 7 years ago

danoctavian commented 7 years ago

I needed to add this at the end of my CLIENT.ovpn script so that the pushed DNS configurations take effect. DNS does not work without these extra lines in the .ovpn file:

script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf

this can be done by fixing the docs and requiring manual instructions for this or a flag in a command to add this at the end.

worked with no problems on mac os.

This extra configuration is described here. https://forums.openvpn.net/viewtopic.php?t=21678

ensonic commented 7 years ago

I need to also do this. I am adding it manually to the client.ovpn file right now. I've tested sending it as a push config, but that is not supported. There is an OVPN_ADDITIONAL_CLIENT_CONFIG already: https://github.com/kylemanna/docker-openvpn/blob/master/bin/ovpn_getclient#L65

but it is not settable nor managed by ovpn_env.sh.

hadim commented 7 years ago

Same here.

macpijan commented 7 years ago

@danoctavian Thanks i ran into the same problem. My client is RPI3 with raspbian jessie.

kylemanna commented 7 years ago

Is this still an issue? Setting Ubuntu specific things for all clients just isn't an option.

stanimirivanovde commented 4 years ago

I am experiencing a similar issue - connected to the VPN server, can ping IP addresses but DNS resolution doesn’t work. My /etc/resolve.conf points to 1.1.1.1 or 9.9.9.9 but still no queries are passing through. Trace route works but only with “-n” otherwise it can’t resolve the names. Pings work only with IP addresses. So for some reason the DNS server is not being pushed correctly.