nslookup timed out, but only from localhost
by damateem from LinuxQuestions.org on (#5NBGZ)
I've configured bind9 on Ubuntu 14.04.6 LTS.
The server running bind (localhost), is at static IP 192.168.0.2 (server1).
Executing nslookup from other hosts on the LAN works great.
Code:$ nslookup google.com
Non-authoritative answer:
Server: UnKnown
Address: 192.168.0.2
Name: google.com
Addresses: 2607:f8b0:4009:819::200e
142.250.191.206However, executing the same command from localhost results in a time out.
Code:root@server1:/etc/bind# nslookup google.com
;; connection timed out; no servers could be reachedHere is my named.conf.options:
Code:// Allow the following to query the DNS.
acl goodclients {
localhost; // This host.
localnets; // All hosts on the LAN.
10.8.0.0/24; // Hosts coming from VPN tunnels.
};
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
allow-query { goodclients; };
forwarders {
// Google DNS servers
8.8.8.8;
8.8.4.4;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};What could cause bind to not be reachable from localhost?
The server running bind (localhost), is at static IP 192.168.0.2 (server1).
Executing nslookup from other hosts on the LAN works great.
Code:$ nslookup google.com
Non-authoritative answer:
Server: UnKnown
Address: 192.168.0.2
Name: google.com
Addresses: 2607:f8b0:4009:819::200e
142.250.191.206However, executing the same command from localhost results in a time out.
Code:root@server1:/etc/bind# nslookup google.com
;; connection timed out; no servers could be reachedHere is my named.conf.options:
Code:// Allow the following to query the DNS.
acl goodclients {
localhost; // This host.
localnets; // All hosts on the LAN.
10.8.0.0/24; // Hosts coming from VPN tunnels.
};
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
allow-query { goodclients; };
forwarders {
// Google DNS servers
8.8.8.8;
8.8.4.4;
};
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};What could cause bind to not be reachable from localhost?