I have got an Ubuntu Linux 12.04.1 server which as one service runs bind9 for name resolution for a xxx.local domain which forwards all other requests to the name servers of my Internet provider.
This works fine for all clients in the network (Windows and Linux), they get name resolution as expected.
Until yesterday the same was true for the server itself. But I updated several packages and rebooted it. Everything seemed fine so I went home. This morning, the proxy and email no longer worked. It turned out that name resolution was the culprit. nslookup on the clients still works fine but on the server it always times out:
nslookup google.com connection timed out; no servers could be reached nslookup google.com 127.0.0.1 ;; connection timed out; no servers could be reached nslookup google.com 192.168.115.250 ;; connection timed out; no servers could be reached
(where 192.168.115.250 is IP address of the server itself)
On a different Linux computer it works:
nslookup google.com Server: 192.168.115.250 Address: 192.168.115.250#53 Non-authoritative answer: Name: google.com Address: ....
On a Windows XP computer it looks like this:
nslookup google.com *** Der Servername für die Adresse 192.168.115.250 konnte nicht gefunden werden: Non-existent domain *** Die Standardserver sind nicht verfügbar. Server: UnKnown Address: 192.168.115.250 Nicht autorisierte Antwort: Name: google.com Address: ...
(The error means "The server name for the address ... could not be found... which probably means that reverse lookup does not work. I never saw that one before.)
If I specify one of the name servers of my Internet provider on my server, it works:
nslookup google.com [IP goes here] Server: [IP goes here] Address: [IP goes here]#53 Non-authoritative answer: Name: google.com Address: ....
I can't figure out what might be wrong here. Since everything worked fine until yesterday, it must have something to do with the latest Ubuntu update or the reboot.
Any hints would be appreciated.
UPDATE: The firewall should not be the problem:
sudo iptables -L -v -n Chain INPUT (policy ACCEPT 16M packets, 6138M bytes) pkts bytes target prot opt in out source destination Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) pkts bytes target prot opt in out source destination Chain OUTPUT (policy ACCEPT 13M packets, 50G bytes) pkts bytes target prot opt in out source destination
Since people keep asking for resolv.conf, I would like to point out, that specifying the IP address of the name server in the nslookup call above did not work. But anyway:
cat /etc/resolv.conf: # Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8) # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 192.168.115.250
(If I change that IP to the name server of my Internet provider, it works, but that's no solution.)
netstat -anp | egrep :53 tcp 0 0 192.168.115.250:53 0.0.0.0:* LISTEN 104414/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 104414/named tcp6 0 0 :::53 :::* LISTEN 104414/named udp 0 0 192.168.115.250:53168 18.104.22.168:123 ESTABLISHED 106273/ntpd udp 0 0 192.168.115.25:53 0.0.0.0:* 104414/named udp 0 0 127.0.0.1:53 0.0.0.0:* 104414/named udp6 0 0 :::53 :::* 104414/named
looks fine to me.
ip route show table local local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1 local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1 broadcast 192.168.115.0 dev eth0 proto kernel scope link src 192.168.115.250 local 192.168.115.250 dev eth0 proto kernel scope host src 192.168.115.250 broadcast 192.168.115.255 dev eth0 proto kernel scope link src 192.168.115.250
I am not sure how to interpret this.
I just found another oddity: It's not just named that does not work but also smtpd:
fetchmail: reading message [...] Trying to connect to 127.0.0.1/25...connection failed. fetchmail: connection to localhost:smtp [127.0.0.1/25] failed: Connection timed out. fetchmail: Connection errors for this poll: name 0: connection to localhost:smtp [127.0.0.1/25] failed: Connection timed out. fetchmail: SMTP connect to localhost failed