3

When I reboot my Ubuntu 14.04 server (with Zimbra mail system) DNS lookup works a few seconds and then it stops.

First I can ping my website but after a minute I cannot, see this:

hans@ubumail:~$ ping www.gso.nl
PING www.gso.nl (217.115.205.81) 56(84) bytes of data.<br>
64 bytes from 217.115.205.81: icmp_seq=1 ttl=122 time=3.35 ms
64 bytes from 217.115.205.81: icmp_seq=2 ttl=122 time=3.19 ms
64 bytes from 217.115.205.81: icmp_seq=3 ttl=122 time=17.3 ms
--- www.gso.nl ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2001ms
rtt min/avg/max/mdev = 3.193/7.961/17.342/6.634 ms

hans@ubumail:~$ ping www.gso.nl
PING www.gso.nl (217.115.205.81) 56(84) bytes of data
64 bytes from 217.115.205.81: icmp_seq=1 ttl=122 time=4.07 ms
64 bytes from 217.115.205.81: icmp_seq=2 ttl=122 time=4.20 ms
64 bytes from 217.115.205.81: icmp_seq=3 ttl=122 time=2.91 ms
64 bytes from 217.115.205.81: icmp_seq=4 ttl=122 time=3.95 ms
64 bytes from 217.115.205.81: icmp_seq=5 ttl=122 time=3.24 ms
64 bytes from 217.115.205.81: icmp_seq=6 ttl=122 time=7.11 ms
--- www.gso.nl ping statistics ---
6 packets transmitted, 6 received, 0% packet loss, time 5004ms
rtt min/avg/max/mdev = 2.912/4.249/7.110/1.362 ms

hans@ubumail:~$ ping www.nn.nl
ping: unknown host www.nn.nl

hans@ubumail:~$ ping www.gso.nl
ping: unknown host www.gso.nl

hans@ubumail:~$ ping www.gso.nl
ping: unknown host www.gso.nl

It looks something is overriding the name server settings after the reboot.

My network settings:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
     address 192.168.168.20
     gateway 192.168.168.168
     netmask 255.255.255.0
     network 192.168.168.0
     broadcast 192.168.168.255
     dns-nameservers 8.8.8.8

I tried different name servers, that does not help. How to solve this issue?

2
  • 1
    Please add the entries of /etc/resolv.conf..Also when the DNS lookup is not working did you try to ping the ip directly i.e. ping 217.115.205.81?
    – heemayl
    Feb 26, 2015 at 17:05
  • 1
    I see there is something in resolf.conf that is comming from another service: <br># Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)<br> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN<br> nameserver 127.0.0.1<br><br>Where do I configure this? Feb 26, 2015 at 18:32

2 Answers 2

1

Fill your name Server into /etc/resolvconf/resolv.conf.d/head the content like this (samples):

nameserver 8.8.8.8
nameserver 8.8.4.4

Then in shell command type : #>sudo resolvconf -u this is resolve my problem

2
  • If you are not sure about something please post it as a comment, not answer. OP might not be using resolvconf and 4.4.4.4 is not a valid nameserver.
    – heemayl
    Feb 26, 2015 at 17:47
  • I tried this. When I modify /etc/resolvconf/resolv.conf.d/head insert the 8.8.8.8 nameserver and run sudo resolvconf -u then 2 name server entries are in /etc/resolv.conf the one I edited and this line "nameserver 127.0.0.1" WHere does the second one come from? Feb 26, 2015 at 18:42
0

The nameserver 127.0.0.1 will reside in /etc/resolv.conf if you use dnsmasq based name resolution. To disable it run the following from terminal:

sudo sed -i.bak 's/\(dns=dnsmasq\)/#\1/' /etc/NetworkManager/NetworkManager.conf

Make sure you don't have network-manager configured to manage your network, also remove any nameserver entry (if inserted any) from /etc/resolvconf/resolv.conf.d/{base,head,tail}. Now doing the following should resolve the issue:

sudo ifdown eth0 && sudo ifup eth0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .