DNS problem

Questions about WIFI networks and devices
Forum rules
Before you post please read how to get help
damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

DNS problem

Post by damienbourgeonnui » Thu Sep 26, 2019 7:09 pm

Hello,

I have a problem with DNS.

I am connected with wifi to a router (a raspberry pi running a vpn client connected to a vpn server). The DNS in the router are set to use the DNS provided by the VPN provider.

If I connect my smartphone to this router and run a DNS test, it shows the DNS provided by the VPN provider, so it is fine.

But, if I connect my main computer (LINUX Mint 18.3 Sylvia) to this router and run a DNS test in my browser (Firefox) it says my DNS are:
Your IP:
79.xxx [France, French Republic AS29608 Absolight]
You use 1 DNS server:
146.112.128.67 [France, French Republic AS36692 OpenDNS, LLC]
Conclusion:
DNS may be leaking.
which are not the DNS I should get (I should have the DNS provided by my VPN provider, the same as my smartphone).

So I checked the connection settings of my computer and I have these settings:

Image

&

Image

which are the correct DNS settings I am expecting (the ones given by my VPN provider).

So what is wrong here as when running a test from my computer I have 146.112.128.67 which I shouldn't have.

Thank you for any help.

sleeper12
Level 6
Level 6
Posts: 1075
Joined: Thu May 25, 2017 3:22 pm

Re: DNS problem

Post by sleeper12 » Thu Sep 26, 2019 11:26 pm

I don't use a VPN, so not sure if this will work or not. But, you might try adding the DNS numbers you want in IPv4 Settings, Additional DNS servers box (separate them with a comma). Change Method box to 'Automatic (DHCP) addresses only' & check the box 'Require IPv4 addressing for this connection to complete'. Then Reboot.

User avatar
catweazel
Level 19
Level 19
Posts: 9521
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: DNS problem

Post by catweazel » Thu Sep 26, 2019 11:48 pm

sleeper12 wrote:
Thu Sep 26, 2019 11:26 pm
Then Reboot.
Why? Surely merely disconnecting the network link and reconnecting will suffice.
¡uʍop ǝpısdn sı buıɥʇʎɹǝʌǝ os ɐıןɐɹʇsnɐ ɯoɹɟ ɯ,ı

User avatar
trytip
Level 11
Level 11
Posts: 3705
Joined: Tue Jul 05, 2016 1:20 pm

Re: DNS problem

Post by trytip » Fri Sep 27, 2019 12:22 am

try prinary DNS 127.0.0.1
secondary be the same
reboot or disable/enable network tray icon
Image

sleeper12
Level 6
Level 6
Posts: 1075
Joined: Thu May 25, 2017 3:22 pm

Re: DNS problem

Post by sleeper12 » Fri Sep 27, 2019 1:16 am

catweazel wrote:
Thu Sep 26, 2019 11:48 pm
sleeper12 wrote:
Thu Sep 26, 2019 11:26 pm
Then Reboot.
Why? Surely merely disconnecting the network link and reconnecting will suffice.
Well, I'm overcautious I suppose. I reboot just in case. :lol:

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Fri Sep 27, 2019 11:46 am

I think the problem is solved.

It appears that in my router (a Raspberry Pi with a vpn client) /etc/resolv.conf was 8.8.8.8 instead of 127.0.0.1 . I changed that this morning and when testing from my computer connected to this router I have now the correct DNS server address, the one given by my vpn provider.

Anyway, thank you for your replies!

User avatar
trytip
Level 11
Level 11
Posts: 3705
Joined: Tue Jul 05, 2016 1:20 pm

Re: DNS problem

Post by trytip » Sat Sep 28, 2019 9:41 am

the warning in /etc/resolv.conf say Do not edit. if you edit this file it will be written over at some point.

Code: Select all

sudo rm -f /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
reboot
this will remove your current /etc/resolv.conf and make a symlink to the true resolv.conf which is now managed by systemd
you can now edit /etc/resolv.conf and the settings will not be written over
Image

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sat Sep 28, 2019 11:09 am

Well, I said it was solved, but actually it is not. The 146.112.128.68 DNS adress appeared again today. I have no idea why as I am connected to my router then to a vpn. The dns in my router (vpn client connected to a vpn server) are set properly. So why does my computer connected to this router indicate other DNS?

Any idea?

User avatar
trytip
Level 11
Level 11
Posts: 3705
Joined: Tue Jul 05, 2016 1:20 pm

Re: DNS problem

Post by trytip » Sat Sep 28, 2019 11:34 am

the warning in /etc/resolv.conf say Do not edit what's your DNS again? https://dnsleaktest.com
Image

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sat Sep 28, 2019 11:53 am

sleeper12 wrote:
Thu Sep 26, 2019 11:26 pm
I don't use a VPN, so not sure if this will work or not. But, you might try adding the DNS numbers you want in IPv4 Settings, Additional DNS servers box (separate them with a comma). Change Method box to 'Automatic (DHCP) addresses only' & check the box 'Require IPv4 addressing for this connection to complete'. Then Reboot.
Thanks. It doesn't change anything, I still have the same result.

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sat Sep 28, 2019 11:59 am

trytip wrote:
Sat Sep 28, 2019 11:34 am
the warning in /etc/resolv.conf say Do not edit what's your DNS again? https://dnsleaktest.com
Wait, you are saying I should edit /etc/resolv.conf on my main computer?

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sun Sep 29, 2019 10:48 am

Sorry to insist but I'd like any help... I'm not a computer guy and I don't understand why my DNS aren't the right ones...

Thank you.

User avatar
trytip
Level 11
Level 11
Posts: 3705
Joined: Tue Jul 05, 2016 1:20 pm

Re: DNS problem

Post by trytip » Sun Sep 29, 2019 11:29 am

what's your DNS again? https://dnsleaktest.com
what is your /etc/hosts <<< file
what is your /etc/NetworkManager/NetworkManager.conf <<< file
what is your iwconfig <<< command in terminal
Image

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sun Sep 29, 2019 1:31 pm

Thanks @trytip

First my computer is connected to a Raspberry Pi via wifi. There is a vpn in the Pi. So I should have the dns provided by this vpn. That's what I want.
what's your DNS again?
146.112.128.66 r3.compute.cdg1.edc.strln.net. OpenDNS Paris, France

That's not the dns I expect.
what is your /etc/hosts <<< file
127.0.0.1 localhost
127.0.1.1 arnauld
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
192.168.1.21 arnauld.org
what is your /etc/NetworkManager/NetworkManager.conf <<< file
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
what is your iwconfig
$  iwconfig
enp9s0 no wireless extensions.

lo no wireless extensions.

wlp11s0 IEEE 802.11 ESSID:"brique"
Mode:Managed Frequency:2.437 GHz Access Point: 02:27:EB:98:FA:00
Bit Rate=72.2 Mb/s Tx-Power=22 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=61/70 Signal level=-49 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:1719 Missed beacon:0

docker0 no wireless extensions.

----
(wlp11s0 IEEE 802.11 ESSID:"brique") = It is the wifi network created by the Raspberry Pi to which I am connected. There is a vpn client in it which should give me the dns provided by the vpn server. The correct dns are configured properly in this vpn client

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Fri Oct 11, 2019 12:44 pm

My problem isn't solved, I still don't know why my DNS adress isn't the correct one. Would you have any idea?

Thank you.

User avatar
trytip
Level 11
Level 11
Posts: 3705
Joined: Tue Jul 05, 2016 1:20 pm

Re: DNS problem

Post by trytip » Sat Oct 12, 2019 12:06 pm

two things i do not have any experience with
connected to a Raspberry Pi via wifi. There is a vpn in the Pi
but in response to
what is your /etc/NetworkManager/NetworkManager.conf <<< file
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
back it up (rightclick on it and compress) then use this since it's what i have and see what difference it makes

Code: Select all

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

[device]
wifi.scan-rand-mac-address=no
Image

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sun Oct 13, 2019 11:24 am

Thank you, I changed the NetworkManager.conf then relaunched it with

Code: Select all

sudo service NetworkManager stop

Code: Select all

sudo service NetworkManager start
but no luck, I still have that mysterious dns adress.

User avatar
Spearmint2
Level 16
Level 16
Posts: 6780
Joined: Sat May 04, 2013 1:41 pm
Location: Maryland, USA

Re: DNS problem

Post by Spearmint2 » Sun Oct 13, 2019 12:46 pm

Can't you change the DNS setting in your router instead?
All things go better with Mint. Mint julep, mint jelly, mint gum, candy mints, pillow mints, peppermint, chocolate mints, spearmint,....

damienbourgeonnui
Level 1
Level 1
Posts: 27
Joined: Wed Aug 15, 2018 2:43 pm

Re: DNS problem

Post by damienbourgeonnui » Sun Oct 13, 2019 1:23 pm

Spearmint2 wrote:
Sun Oct 13, 2019 12:46 pm
Can't you change the DNS setting in your router instead?
Actually my router is my raspberry pi (the pi is behind another router). My pi has a vpn client (with the correct dns settings, the dns adress I should have) running and creates a wifi network to which I connect my computer, phone, etc. If I connect my phone and test dns, the result is ok. But if I connect my computer to the same network then I have a weird dns adress I shouldn't have.

So the culprit is in my computer but I don't know where/how. It is not related to a browser/addon problem as I tested with different browsers and from the command line too. It seems that something (dns leak ?) bypass the dns settings (from my vpn) in my router (the pi).

sleeper12
Level 6
Level 6
Posts: 1075
Joined: Thu May 25, 2017 3:22 pm

Re: DNS problem

Post by sleeper12 » Sun Oct 13, 2019 2:23 pm

Have you run a dns leak test? Maybe something here will help:
https://www.pcsuggest.com/check-and-fix-dns-leak-linux/

Post Reply

Return to “Wireless”