idlab-discover / easy-openvpn-server

Plug-and-play OpenVPN server which generates server and client config files for you
https://snapcraft.io/easy-openvpn-server
GNU Affero General Public License v3.0
69 stars 9 forks source link

DNS forwarding problem? #16

Closed bonswouar closed 2 years ago

bonswouar commented 2 years ago

Since I've installed the snap and configured the client (following the documented steps), when connected to the VPN I haven't been able to use it for external traffic, as no DNS can be resolved.

I'm surprised as it's supposed to be "plug-and-play", but I can't find what the issue could be except a problem with the package configuration? I can ping IPs directly, but not from their domain name (and dig returns a timeout).

I've tried to set dhcp-option DNS 8.8.8.8 in the client conf file, tweaked the NetworkManager config, etc, but that didn't change anything.

I couldn't find how to modify the server configuration file (but I believe that's on purpose?), although I've tried to guess the command snap set easy-openvpn-server push="dhcp-option DNS 8.8.8.8", but no more luck (and no idea if the command actually did change anything).

I've also played with openresolv, tried many configuration options for the client.... Still nothing

(and yes, after all this it would have probably been much quicker for me to just install and configure a "normal" openvpn package haha)

And I see no special log on the server except some file not found error, here are the last few lines:

Apr 12 12:13:40 myserver easy-openvpn-server.udp-server[117473]: Tue Apr 12 12:13:40 2022 145.224.77.103 [default] Peer Connection Initiated with [AF_INET6]::ffff:145.224.77.103:55986 (via ::ffff:198.23.>
Apr 12 12:13:40 myserver easy-openvpn-server.udp-server[117473]: Tue Apr 12 12:13:40 2022 default/145.224.77.103 Could not access file '/root/snap/easy-openvpn-server/101/client-configs/default': Permission denied
Apr 12 12:13:40 myserver easy-openvpn-server.udp-server[117473]: Tue Apr 12 12:13:40 2022 default/145.224.77.103 Could not access file '/root/snap/easy-openvpn-server/101/client-configs/DEFAULT': Permission denied
Apr 12 12:13:40 rmyserver easy-openvpn-server.udp-server[117473]: Tue Apr 12 12:13:40 2022 default/145.224.77.103 MULTI_sva: pool returned IPv4=10.234.159.6, IPv6=fd30:83fb:defd:2c61::1000

Did I miss something?!

Environment:

bonswouar commented 2 years ago

I ended up installing OpenVPN "the normal way" and it works. My guess would be it was some firewall issues..