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?

hayalci
  • 3,611
  • 3
  • 25
  • 37
M. BY
  • 21
  • 1
  • 4

3 Answers3

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

Swisstone
  • 6,357
  • 7
  • 21
  • 32
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:

Dave M
  • 4,494
  • 21
  • 30
  • 30
user2563336
  • 116
  • 4
  • 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 06 '17 at 13:36
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.

captain_G
  • 121
  • 3