问题原文
原帖链接 · Riley Willow · CC BY-SA 3.0
I am using FreeBSD to setup a DNS server.
I have install BIND and setup everything in resolv.conf and named.conf file.
This is the ip address of my DNS server 192.168.10.100.
in resolv.conf I added the following line,
nameserver 192.168.10.100
I have also create a zone in named.conf file called .pbv, and then I have used nsupdate to add a domain to this zone which is testing.pbv
Now, when I nslookup 192.168.10.100 on the server itself, it doesn't work and always return,
;; Got SERVFAIL reply from 192.168.10.100, trying next server
;; connection timed out; no servers could be reached
However when I nslookup testingpbv it returns following,
Server: 192.168.10.100
Address: 192.168.10.100#53
Name: testing.pbv
Address: 192.168.10.100
I don't understand why I cannot run nslookup 192.168.10.100 ?
This is my resolv.conf
nameserver 192.168.10.100
nameserver 8.8.8.8
It merits mentioning here that I can't even lookup google.com or any other external domain for that matter.
已采纳解答
原帖链接 · Andrew B · CC BY-SA 3.0
There are a few things going on here. Let's break it down.
- Unless you've configured a reverse zone for
10.168.192.in-addr.arpa, your recursive server has to get this information from somewhere else. You have not mentioned setting up such a zone, so I will assume that it does not exist. - RFC 1918 private networks are not routed on the internet. If a DNS server has to perform full recursion on a reverse DNS request for this IP space, one of two things happens:
- Recursion is performed until IANA's blackhole servers are reached. They will return a response of
NXDOMAIN. - The server skips the step of reaching out to the internet because it knows it is pointless. It forges a response of
NXDOMAINand does not waste the bandwidth. BIND 9.9 and upward does this through something called automatic empty zones.
- Recursion is performed until IANA's blackhole servers are reached. They will return a response of
To simplify all of this, if you're seeing SERVFAIL here it means something is broken. Either the server is trying to get the answer from the internet and failing to do so, or you have a broken configuration and are not reading the logs closely enough. (as an example, this would happen if you had created a zone with illegal syntax for 10.168.192.in-addr.arpa)
To rule out a network problem, you can try running dig +trace 10.168.192.in-addr.arpa. If this command returns an error, you will need to troubleshoot your network. If it does not return an error, examine your logs more carefully.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
