Okay, so basically I am using openvpn to connect on one of the NordVPN's servers.
But long story short, I haven't even noticed all until this night, my DNS is leaking somehow.
My sys. info:
str1ng@str1ng:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.2 LTS
Release: 20.04
Codename: focal
Went to the NordVPN's support, been there for like 2 hours, couldn't solve it, so it happens to be that this is my only hope at the moment.
I've tried so many things... Like answer from here: https://www.ubuntubuzz.com/2015/09/how-to-fix-openvpn-dns-leak-in-linux.html
Also I've tried editing .ovpn server config file with adding block-outside-dns
, but then I am getting this:
Options error: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/ovpn_tcp/ch303.nordvpn.com.tcp.ovpn:18: block-outside-dns (2.4.7)
Use --help for more information.
So that doesn't make things any better, so after that, I've done:
pull-filter ignore "block-outside-dns"
And then ran sudo openvpn /etc/.....
to connect to server, but also nothing, my DNS's still leaking.
Apart from that they told me to disable IPv6, so I did that by following this guide:
Open a terminal window. Type this command:
sudo nano /etc/sysctl.conf Add the following at the bottom of the
file:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6
= 1 net.ipv6.conf.lo.disable_ipv6 = 1 net.ipv6.conf.tun0.disable_ipv6 = 1
Save and close the file. Reboot the device. To re-enable IPv6, remove the above lines from /etc/sysctl.conf and reboot the device.
Also, I've done this:
https://support.nordvpn.com/Connectivity/Linux/1134945702/Change-your-DNS-servers-on-Linux.htm
But after doing this and checking on resolv.conf ; it's again overwritten by NetworkManager.
This looks like infinite loop. If anyone can help I'd be grateful
Edited with what one of users have required
str1ng@str1ng:~/Desktop$ ls -al /etc/resolv.conf
lrwxrwxrwx 1 root root 39 Jun 8 16:13 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
dpkg -l *dnsmasq*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-================-=================-============-============================================
un dnsmasq <none> <none> (no description available)
ii dnsmasq-base 2.80-1.1ubuntu1.4 amd64 Small caching DNS proxy and DHCP/TFTP server
un dnsmasq-base-lua <none> <none> (no description available)
str1ng@str1ng:~/Desktop$ grep -i dns /etc/systemd/resolved.conf
#DNS=
#FallbackDNS=
#MulticastDNS=no
#DNSSEC=no
#DNSOverTLS=no
#DNSStubListener=yes