MikeP2017 wrote
I can't believe that some people think that remembering and typing in a whole bunch of not very meaningful characters into a terminal is easier than a single mouse click. Back in the late 60's I programed IBM 1401s in Fortran and in the early 80's I created spreadsheets and databases in MsDos so.......Thank God for GUIs . Some are better than others, but they are all a damn sight better than Command Prompt and the Linux Terminal, both from the Dark Ages. I could have kissed Bill Gates in 1987 when he gave me Excel for Windows.
As I said before your code does not work
But fortunately I have found a group of Linux experts who are aware of the limitations of the Linux implementation of OpenVPN.
Our temporary fix, in case anybody is following this thread with the same problems as us, is to have the following specified in IPv4 section of network settings
automatic DNS turned off
DNS servers, in this order:
1 the VPN DNS server (for IPVanish 168.18.0.1)
2 the contingency VPN DNS server (for IPVanish 168.18.0.2)
3 1.1.1.1 (Cloudflare public DNS)
4 1.0.0.1 (Cloudflare contingency public DNS)
This would ensure that with the VPN off, the Cloudflare servers will be used, and that when it is on any leaks will only be to the Cloudflare's non-logging DNS servers
It is not perfect but it will do until OpenVPN and the Linux/Network Manager guys get together to fix the bugs and and plug the security hole
Once again, thanks for your efforts TinCan, but I have found the solution elsewhere. If nothing else you have learned that the Linux implementation uses .opvn configuration files
All the best
end of thread
I concur with MikeP2017. I've built my own OpenVPN server for remote access to my network and encrypting traffic when on public WIFI, so all traffic is routed through the VPN. I've had no issues with DNS leak on my windows/android devices using ( block-outside-dns ) in my .ovpn client config file. Obviously this does not work on Linux.
I've just started using Linux Mint 19 and found out ( block-outside-dns ) makes OpenVPN fail in terminal. So I have removed ( block-outside-dns ), tried the below commands added to my client .ovpn file and was still getting DNS leak as tested with
www.dnsleaktest.com.
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
After searching other forums I also tried the below commands added to client .ovpn file. Making sure I have the correct packages installed.
script-security 2
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
Installed Packages
sudo dpkg-query -l | grep resolv
ii libgeoip1:amd64 1.6.12-1 amd64 non-DNS IP-to-country resolver library
ii libnss-resolve:amd64 237-3ubuntu10 amd64 nss module to resolve names via systemd-resolved
ii openvpn-systemd-resolved 1.2.7-1 amd64 integrates OpenVPN with systemd-resolved
ii resolvconf 1.79ubuntu10 all name server information handler
Even tried adding the below commands to my client .ovpn file in different combinations with the above commands.
dhcp-option DNS 192.168.1.2
dhcp-option DOMAIN-ROUTE
Still did not solve my DNS leak issue. By the way I was running the OpenVPN client in the terminal with the ( openvpn myvpnfile.ovpn ) command.
The OpenVPN terminal output showed that the added commands to my .ovpn file had taken, but the DNS leak fault was still present when tested.
www.dnsleaktest.com.
The only thing that has fixed this issue for me is what MikeP2017 has posted. see below
Setting for my physical network device in the Network Manager
automatic DNS turned off
DNS servers, in this order:
1 the VPN DNS server (for IPVanish 168.18.0.1)
2 the contingency VPN DNS server (for IPVanish 168.18.0.2)
3 1.1.1.1 (Cloudflare public DNS)
4 1.0.0.1 (Cloudflare contingency public DNS)
I just modified the above to suite my needs. But as MikeP2017 said this is just a temp work a round not a fix..
Thanks for help MikeP2017.
It seems to me that the Linux version of OpenVPN is not re-routing DNS requests through the VPN tunnel even with the correct commands in the .ovpn file.
If anyone has a proper fix for this please share. until then MikeP2017 work a round is messy but works for now. 😃 😃 😃
Ant-S