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

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
mudshark

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

Post 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 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 LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
minitux

Re: /etc/resolv.conf

Post 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
mudshark

Re: /etc/resolv.conf - dnsmasq

Post 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 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

Re: /etc/resolv.conf - dnsmasq

Post by mudshark »

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
Locked

Return to “Networking”