/etc/resolv.conf - dnsmasq - DNS not working

Questions about cabled networking
Forum rules
Before you post please read how to get help
Post Reply
mudshark
Level 1
Level 1
Posts: 7
Joined: Wed Jan 10, 2018 11:55 am

/etc/resolv.conf - dnsmasq - DNS not working

Post by mudshark » Thu Jan 11, 2018 5:24 am

Hi all,
I've only just started looking at mint (long, long time user of redhat based distros) so possible I'm missing something simple. Have downloaded the latest cinnamon 18.3

I first installed mint on a new laptop for one of our users, I put it in our DHCP server and put it on the wired network as this would be faster for updates extra software etc. After install and reboot it wouldn't resolve any DNS names, checking ifconfig, it has picked up it's IP, broadcast and mask fine. the network manager app shows we are connected and has the list of DNS server retrieved from DHCP. However nslookup on command line showed it was using 127.0.1.1 as the only nameserver.
I added extra lines for out nameservers to /etc/resolv.conf and everything is fine, until a reboot, when as expected resolv.conf goes back to having one one nameserver line 172.0.1.1

I then installed it on virtualbox on my PC (bridged network direct to second NIC) and the same issue has occured

so, why is resolv.conf not getting the DNS nameservers that the network app has? (resolv.conf DOES pick up domain search entries from DHCP)

cheers, I will have a look resolveconf when I get a minute
Last edited by mudshark on Fri Jan 12, 2018 6:44 am, edited 2 times in total.

minitux
Level 5
Level 5
Posts: 860
Joined: Tue Sep 12, 2017 10:05 am

Re: /etc/resolv.conf

Post by minitux » Thu Jan 11, 2018 6:15 am

try in ths way for maintain the dns change

Code: Select all

gksudo xed /etc/resolvconf/resolv.conf.d/head
add your DNS to file and then save and close the file.

in the end

Code: Select all

sudo resolvconf -u
after this , reboot the system and look

mudshark
Level 1
Level 1
Posts: 7
Joined: Wed Jan 10, 2018 11:55 am

Re: /etc/resolv.conf - dnsmasq

Post by mudshark » Thu Jan 11, 2018 6:51 am

will this not interfere with the DNS servers when the laptop moves onto wireless networks? (and/or gets different DHCP information from a different network)

When I put the laptop onto wireless networks DNS lookups work despite the resolve.conf only having 127.0.1.1 as a nameserver, so I'm assuming there is some other failure when on a wired network. From what I understand 172.0.1.1 is used by debian based distros to refer to it's own hostname, so I'm assuming on wireless something (dnsmasq?) redirects a DNS request to 127.0.1.1 to the actual DNS nameservers, and this isn't happening when on a wired connection.

mudshark
Level 1
Level 1
Posts: 7
Joined: Wed Jan 10, 2018 11:55 am

Re: /etc/resolv.conf - dnsmasq

Post by mudshark » Fri Jan 12, 2018 6:15 am

OK the simple solution was to edit (vim isn't installed by default!! WTAF?)

Code: Select all

/etc/NetworkManager/NetworkManager.conf
and comment out (add a #) to the line

Code: Select all

dns=dnsmasq
because for some bizarre reason NetworkManager's default is to use a local DNS server, DNS Cache and router advertiser i.e. dnsmasq and you cannot remove dnsmasq without entering the gates of dependency hell and breaking everything to do with NetworkManager

for the life of me I cannot understand why I'd want my laptop or PC to be it's own DNS server, DHCP server, name cache and name server, I have proper DNS servers for that (and use openDNS on my ISP provided router at home)

now i can move on to configuring the box to be part of NIS, so I can get my real home filesystem from the server

Post Reply

Return to “Ethernet”