0

With my ubuntu 16.04, my /etc/resolv.conf change every system start

cat /etc/resolv.conf  
nameserver 127.0.0.1

Network-manager have the correct dns name server 192.168.1.1
I removed bind9 and all related packages.
No special config on rc folders nor rc.local
No dns-nameserver options with /etc/network/interfaces.

I missed something? What app can change this file automatically?

3
  • Do you use DHCP?
    – HBruijn
    Apr 6, 2017 at 11:45
  • Perhaps this could answer your question: askubuntu.com/questions/627899/…
    – chloesoe
    Apr 6, 2017 at 11:46
  • Yes I use DHCP Thanks, the solution is to comment #dns=dnsmask from network-manager.conf
    – M. BY
    Apr 11, 2017 at 14:26

3 Answers 3

0

I can't remember when this started, but resolv.conf is a system generated file.

Anything (more specifically, static options from previous resolv.conf's) that you want adding to that should be put in /etc/resolvconf/resolv.conf.d/base.

0

Make sure resolvconf service is running, enable it:

sudo systemctl start resolvconf.service

then enter this one:

sudo nano /etc/resolvconf/resolv.conf.d/head

then add/change the nameservers you want and save, and then modify the resolv.conf and close.

remember to set your network-manager dns to what you've set in resolv.conf

0

Do you use DHCP?

  • Does maybe your DHCP server send wrong nameserver pointers?
  • Do you have a custom dhcp.conf that uses it's own nameserver config and ignores the DHCP server?

If you don't use DHCP:

1
  • Thank you, I am using network-manager (iface wlan with dhcp) But when displaying dns with network-manager show interface informations: the correct ones are showing.
    – M. BY
    Apr 6, 2017 at 13:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.