DNS not working after update

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
networkinss
Level 1
Level 1
Posts: 25
Joined: Thu Feb 08, 2018 12:33 am

DNS not working after update

Post by networkinss »

Hello,
after an update of my 18.3 installation, I have serious problems with DNS.
In most nets DNS is simply not working anymore. IP addresses are no problem.
I was using several nets, some ethernet, some wireless.
In some nets I get the correct DNS, and all is working.
But in most nets DNS is not working at all.

I got that problem obviously with the last update (few days ago, maybe a week).

My workaround is currently to work from USB stick, which has a linuxmint 18.2 installation (without updates).
I get there some necessary IPs and put them into the /etc/hosts.

I have the problem on two computer with linuxmint, one was having 18.2.

It might be a problem of the installed VPN.
Found
viewtopic.php?f=157&t=263542
with about the same problems, but it has no solution.
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 not working after update

Post by trapperjohn »

Hi,

One of my first steps with a Mint install is to set the DNS servers manually and permanently. (Others may disagree with this, but it has worked perfectly for me... for years now.)
If you want to give it a try:

First, decide on your preferred nameserver. I typically use the router (192.168.1.1 in my case) and add the Google DNS as an alternate.

For safety, make a safe copy of /etc/resolv.conf.

Code: Select all

sudo mv /etc/resolv.conf /etc/resolv.safe
Then:

Code: Select all

sudo nano /etc/resolv.conf
make it read:

nameserver 8.8.8.8

#Add other nameserver lines as needed/wanted.

Save it with [cntl]o then close it with [cntl]x

Finally, make it immutable:

Code: Select all

sudo chattr +i /etc/resolv.conf


Test name resolution.



If it doesn't work, then reverse all of that:

Code: Select all

sudo chattr -i /etc/resolv.conf
sudo rm /etc/resolv.conf
sudo mv /etc/resolv.safe /etc/resolv.conf
networkinss
Level 1
Level 1
Posts: 25
Joined: Thu Feb 08, 2018 12:33 am

Re: DNS not working after update

Post by networkinss »

My current entry is:
nameserver 209.222.18.222
nameserver 209.222.18.218

I cannot try your solution right now but what happens in DHCP network (like public WiFi) will it change the DNS server or will it take it from resolv.conf file ?

Update:
I checked the nameserver and they are indeed from the VPN I am using sometimes.
So it is a problem of the VPN configuration.
Have to check with them.

Thanks for the help.

I consider this post as being solved.
User avatar
Pippin
Level 4
Level 4
Posts: 441
Joined: Wed Dec 13, 2017 11:14 am
Location: The Shire

Re: DNS not working after update

Post by Pippin »

If you want to override DNS servers pushed by ANY gateway/router reliably, you can add

Code: Select all

# Override DNS from any DHCP server
supersede domain-name-servers nameserver 209.222.18.222, 209.222.18.218;
to

Code: Select all

/etc/dhcp/dhclient.conf
This also works together with OpenVPN update-resolv-conf.

Edit:
Typo
I gloomily came to the ironic conclusion that if you take a highly intelligent person and give them the best possible, elite education, then you will most likely wind up with an academic who is completely impervious to reality.
Halton Arp
User avatar
mfcallahan
Level 1
Level 1
Posts: 26
Joined: Sat May 15, 2010 1:29 pm
Location: Phx, AZ
Contact:

Re: DNS not working after update

Post by mfcallahan »

trapperjohn wrote: Thu Feb 08, 2018 5:05 pm One of my first steps with a Mint install is to set the DNS servers manually and permanently. (Others may disagree with this, but it has worked perfectly for me... for years now.)
Thanks for this suggestion! I upgraded from Mint 20.1 to 20.2 and was having issues with DNS not resolving afterwards. Since I use a Pi-hole for a DNS on my home network and my desktop never leaves the house, so setting the DNS server permanently is a good solution for me too. Editing /etc/resolv.conf per your suggestion immediately fixed my issue.
Locked

Return to “Networking”