DNS Issues / Keeps Using ISP DNS

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
horizonz

DNS Issues / Keeps Using ISP DNS

Post by horizonz »

First post here and glad to be a part of the community!

Linux Mint 17.1 - Cinnamon - 2010 Macbook Pro

My issue has been persistent for the past few days. I have been trying to use OpenDNS and have set my router to use those DNS addresses rather than my ISP. When I restart the network-manager my browser cannot resolve the DNS for about 5 minutes and then it finally does so, but uses the ISP DNS to do so. I have gone further and changed my resolv.conf file to reflect the OpenDNS settings, but Mint automatically changes them back to the ISP DNS after a few minutes or after reboot. Also, I have tried to change the DHCP from auto to only using addresses and setting the DNS addresses to OpenDNS. Still a no go. I really do not know where the problem lies, but even if I use eth0 it has the same problems. On my desktop, which also runs Mint, I cannot change the DNS either, but I am not having the same issues as I am having on my Macbook with the long wait to resolve hosts. My firewall is deny incoming by default, but I have necessary services enabled including port 53 UDP and TCP. This has led me to believe that it is a local DNS issue with my router, but I have even used DD-WRT with the same issues. Currently using stock router firmware. Does anyone have any advice?

ifconfig - currently only eth0 is enabled - Same ifconfig output when wireless is enabled though.

eth0 Link encap:Ethernet HWaddr c4:2c:03:2f:b4:fa
inet addr:192.168.1.5 Bcast:192.168.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:12891 errors:0 dropped:0 overruns:0 frame:0
TX packets:10677 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12764032 (12.7 MB) TX bytes:2463378 (2.4 MB)
Interrupt:17

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:9474 errors:0 dropped:0 overruns:0 frame:0
TX packets:9474 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:905528 (905.5 KB) TX bytes:905528 (905.5 KB)

tun0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:10.194.1.6 P-t-P:10.194.1.5 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1500 Metric:1
RX packets:11206 errors:0 dropped:0 overruns:0 frame:0
TX packets:9003 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:11171238 (11.1 MB) TX bytes:1337972 (1.3 MB)
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
trapperjohn

Re: DNS Issues / Keeps Using ISP DNS

Post by trapperjohn »

A temporary hack:

Edit the resolv.conf to reflect your desired nameservers. Immediately after saving it, make it immutable:

sudo chattr +i /etc/resolv.conf

This will make it impossible for any service to overwrite the file, ever. It can be undone with:
sudo chattr -i /etc/resolv.conf

As for the original cause, it still should be determined. I assume your network manager is already set to use a static dns.
horizonz

Re: DNS Issues / Keeps Using ISP DNS

Post by horizonz »

That worked. I plugged in Google's DNS servers and nslookup returned the first nameserver listed. Is that a temp command that will have to be redone on every reboot? I agree that I still need to determine the root issue.
trapperjohn

Re: DNS Issues / Keeps Using ISP DNS

Post by trapperjohn »

Hi,

That command will last forever. In fact you won't be able to delete resolv.conf or edit it - even as root - unless the immutable attribute is removed first.

I am apprehensive about what was causing resolv.conf to be overwritten in the undesired way. I am concerned with the network manager settings. I am not certain which NM you use but the app interface should show you how the DNS is being assigned. I set these to a static set of external servers (like opendns or google's) and never use my router to provide me with dns. With a static server set, no process should be attempting to overwrite resolv.conf.
horizonz

Re: DNS Issues / Keeps Using ISP DNS

Post by horizonz »

This is a just a shot in the dark, but I recently enabled VPN killswitch and I know that impacts network settings. Could that application be causing the DNS issue? Thank you for your expertise trapperjohn.
trapperjohn

Re: DNS Issues / Keeps Using ISP DNS

Post by trapperjohn »

Hello,

I don't use vpnkillswitch but I am thinking yes based on what I have read about it. I secure vpn over ssh.
DrHu

Re: DNS Issues / Keeps Using ISP DNS

Post by DrHu »

horizonz

Re: DNS Issues / Keeps Using ISP DNS

Post by horizonz »

No they weren't user created scripts. I use a VPN client that offers that option and when I enabled it it said that it will make network changes. I just don't understand why it would want to mess with my resolv.conf.
Locked

Return to “Networking”