Page 1 of 1

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

Posted: Thu Jan 11, 2018 5:24 am
by mudshark
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 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

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

Re: /etc/resolv.conf

Posted: Thu Jan 11, 2018 6:15 am
by minitux
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

Re: /etc/resolv.conf - dnsmasq

Posted: Thu Jan 11, 2018 6:51 am
by mudshark
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 as a nameserver, so I'm assuming there is some other failure when on a wired network. From what I understand 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 to the actual DNS nameservers, and this isn't happening when on a wired connection.

Re: /etc/resolv.conf - dnsmasq

Posted: Fri Jan 12, 2018 6:15 am
by mudshark
OK the simple solution was to edit (vim isn't installed by default!! WTAF?)

Code: Select all

and comment out (add a #) to the line

Code: Select all

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