求助:局域网配置dns奇怪问题,请大侠指点
最近配置了一台dns,局域网环境,所有组件都配置了,启动也启动起来了,就是解析不了,实在没辙,来请本论坛大侠看下,指点指点,先谢过:
前台启动结果如下:named -g
Jul 19 10:26:12.260 starting BIND 9.2.1 -g
Jul 19 10:26:12.260 using 1 CPU
Jul 19 10:26:12.264 loading configuration from '/usr/local/bind/etc/named.conf'
Jul 19 10:26:12.298 no IPv6 interfaces found
Jul 19 10:26:12.299 listening on IPv4 interface lo, 127.0.0.1#53
Jul 19 10:26:12.300 listening on IPv4 interface eth0, 192.168.1.3#53
Jul 19 10:26:12.336 command channel listening on 127.0.0.1#953
Jul 19 10:26:12.337 ignoring config file logging statement due to -g option
Jul 19 10:26:12.339 zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Jul 19 10:26:12.342 zone 1.168.192.in-addr.arpa/IN: loaded serial 20060714
Jul 19 10:26:12.344 zone localhost/IN: loaded serial 42
Jul 19 10:26:12.346 zone trrrainaaa.net/IN: loaded serial 20060714
Jul 19 10:26:12.347 running
-----------------------------------------------
查看tcp、udp端口也在监听:netstat -an|head
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 192.168.1.3:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN
tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN
udp 1152 0 192.168.1.3:53 0.0.0.0:*
udp 0 0 127.0.0.1:53 0.0.0.0:*
-----------------------------------------------
但是就是解析不了本地域名:nslookup #server地址是192.168.1.3
Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.
> server 192.168.1.3
Default server: 192.168.1.3
Address: 192.168.1.3#53
> www.trrrainaaa.net
;; connection timed out; no servers could be reached
------------------------------------------------
配置文件存放路径:
/usr/local/bind/etc/named.conf
/usr/local/bind/etc/rndc.conf
/usr/local/bind/etc/rndc.key
/usr/local/bind/var/named/named.local
/usr/local/bind/var/named/named.ca
/usr/local/bind/var/named/localhost.zone
/usr/local/bind/var/named/named.trrrainaaa.net
/usr/local/bind/var/named/named.192.168.1
------------------------------------------------
以下是所有配置文件:
------------------------------------------------
主配置文件:/usr/local/bind/etc/named.conf
//generated by named-bootconf.pl
//acl localhost{127.0.0.0/8;};
acl trrrainaaa.net {192.168.1.0/24;};
options {
directory "/usr/local/bind/var/named";
// named-pid "/usr/local/bind/var/run/named.pid";
allow-query{192.168.1.0/24;};
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
//
// a caching only nameserver config
//
controls {inet 127.0.0.1 port 953 allow { localhost; } keys { "rndc-key"; };
};
zone "." IN {
type hint;
file "/usr/local/bind/var/named/named.ca";
};
zone "localhost" IN {
type master;
file "/usr/local/bind/var/named/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "/usr/local/bind/var/named/named.local";
allow-update { none; };
};
zone "trrrainaaa.net" IN {
type master;
file "/usr/local/bind/var/named/named.trrrainaaa.net";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "/usr/local/bind/var/named/named.192.168.1";
allow-update { none; };
};
include "/usr/local/bind/etc/rndc.key";
-------------------------------------------------
以下是/usr/local/bind/etc/rndc.conf:
# Start of rndc.conf
key "rndc-key" {
algorithm hmac-md5;
secret "CZBll9Ebk7G7OJMC68zdqA==";
};
options {
default-key "rndc-key";
default-server 127.0.0.1;
default-port 953;
};
# End of rndc.conf
# Use with the following in named.conf, adjusting the allow list as needed:
# key "rndc-key" {
# algorithm hmac-md5;
# secret "CZBll9Ebk7G7OJMC68zdqA==";
# };
#
# controls {
# inet 127.0.0.1 port 953
# allow { 127.0.0.1; } keys { "rndc-key"; };
# };
# End of named.conf
---------------------------------------------------
以下是/usr/local/bind/etc/rndc.key:
#Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
algorithm hmac-md5;
secret "CZBll9Ebk7G7OJMC68zdqA==";
};
#controls {inet 127.0.0.1 port 953 allow { localhost; } keys { rndc-key; };
#};
#End of named.conf
---------------------------------------------------
以下是/usr/local/bind/var/named/named.ca:
;This file holds the information on root name servers needed to
; initialize cache of Internet domain name servers
; (e.g. reference this file in the "cache . <file>"
; configuration file of BIND domain name servers).
;
; This file is made available by InterNIC
; under anonymous FTP as
; file /domain/named.cache
; on server FTP.INTERNIC.NET
;
; last update: Nov 5, 2002
; related version of root zone: 2002110501
;
;
; formerly NS.INTERNIC.NET
;
. 3600000 IN NS A.ROOT-SERVERS.NET.
A.ROOT-SERVERS.NET. 3600000 A 198.41.0.4
;
; formerly NS1.ISI.EDU
;
. 3600000 NS B.ROOT-SERVERS.NET.
B.ROOT-SERVERS.NET. 3600000 A 128.9.0.107
;
; formerly C.PSI.NET
;
. 3600000 NS C.ROOT-SERVERS.NET.
C.ROOT-SERVERS.NET. 3600000 A 192.33.4.12
;
; formerly TERP.UMD.EDU
;
. 3600000 NS D.ROOT-SERVERS.NET.
D.ROOT-SERVERS.NET. 3600000 A 128.8.10.90
;
; formerly NS.NASA.GOV
;
. 3600000 NS E.ROOT-SERVERS.NET.
E.ROOT-SERVERS.NET. 3600000 A 192.203.230.10
;
; formerly NS.ISC.ORG
;
. 3600000 NS F.ROOT-SERVERS.NET.
F.ROOT-SERVERS.NET. 3600000 A 192.5.5.241
;
; formerly NS.NIC.DDN.MIL
;
. 3600000 NS G.ROOT-SERVERS.NET.
G.ROOT-SERVERS.NET. 3600000 A 192.112.36.4
;
; formerly AOS.ARL.ARMY.MIL
;
. 3600000 NS H.ROOT-SERVERS.NET.
H.ROOT-SERVERS.NET. 3600000 A 128.63.2.53
;
; formerly NIC.NORDU.NET
;
. 3600000 NS I.ROOT-SERVERS.NET.
I.ROOT-SERVERS.NET. 3600000 A 192.36.148.17
;
; operated by VeriSign, Inc.
;
. 3600000 NS J.ROOT-SERVERS.NET.
J.ROOT-SERVERS.NET. 3600000 A 192.58.128.30
;
; housed in LINX, operated by RIPE NCC
;
. 3600000 NS K.ROOT-SERVERS.NET.
K.ROOT-SERVERS.NET. 3600000 A 193.0.14.129
;
; operated by IANA
;
. 3600000 NS L.ROOT-SERVERS.NET.
L.ROOT-SERVERS.NET. 3600000 A 198.32.64.12
;
; housed in Japan, operated by WIDE
;
. 3600000 NS M.ROOT-SERVERS.NET.
M.ROOT-SERVERS.NET. 3600000 A 202.12.27.33
; End of File
---------------------------------------------------
以下是/usr/local/bind/var/named/named.local:
$TTL 86400
@ IN SOA localhost. root.localhost. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS localhost.
1 IN PTR localhost.
---------------------------------------------------
以下是/usr/local/bind/var/named/localhost.zone:
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS @
1D IN A 127.0.0.1
---------------------------------------------------
以下是/usr/local/bind/var/named/named.trrrainaaa.net
$TTL 300
$ORIGIN trrrainaaa.net.
@ SOA ns.trrrainaaa.net. root.trrrainaaa.net.(
20060714; serial
3600; refresh
900; retry
1209600; expire
3600; minimum
)
@ IN NS ns.trrrainaaa.net.
ns IN A 192.168.1.3
www IN A 192.168.1.101
wwww IN A 192.168.1.102
www1 IN A 192.168.1.103
mail IN A 192.168.1.104
ftp IN A 192.168.1.105
server IN A 192.168.1.106
workstation IN CNAME server.
------------------------------------------------------
以下是/usr/local/bind/var/named/named.192.168.1
$TTL 300
$ORIGIN 1.168.192.in-addr.arpa.
@ SOA ns.trrrainaaa.net. root.trrrainaaa.net. (
20060714 ; serial
3600 ; refresh
900 ; retry
1209600 ; expire
3600 ; minimum
)
@ IN NS ns.trrrainaaa.net.
ns IN A 192.168.1.3
101 IN PTR www.trrrainaaa.net.
102 IN PTR wwww.trrrainaaa.net.
103 IN PTR www1.trrrainaaa.net.
104 IN PTR mail.trrrainaaa.net.
105 IN PTR ftp.trrrainaaa.net.
106 IN PTR server.trrrainaaa.net.
---------------------------------------------------------
以下是相关配置文件:/etc/host.conf
我在末尾添加了multi on
在: /etc/resolv.conf
文件头我添加了:nameserver 192.168.1.3
---------------------------------------------------------
配置基本都在这了,我实在不清楚,既然启动起来了,为什么就是解析不了,还请大家多多指教!谢谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(9)
【——
;; connection timed out; no servers could be reached
——】
——你确定你在测试机上能访问到192.168.1.3服务器么?
再讲了,我在客户端用nslookup时也用了命令server 192.168.1.3,所以,应该没有问题啊,但是就是解析不了,还有谁可以帮帮我找找故障出在哪?谢谢
还有谁有不同想法请提出来,谢谢!!!
這個不一定的!!!
我認為加了肯定有好處,我也加了的!
比如你在本面有MAIL服務,如果沒有加的話,那么就解釋到墐名外網IP。。MX。。。
如果衹是單純的一臺DNS。。。可以不加!!否則要加!
你的bind服务器上,在/etc/resolv.conf上加入了nameserver 192.168.1.3有什么意义呢?你平时不用在服务器上上网吧?在客户机指定dns服务器地址为192.168.1.3才对啊!
不清楚4楼是什么意思,我已经在/etc/resolv.conf上加入了nameserver 192.168.1.3,是不是在named.trrrainaaa.net上也加入这一行呢?还是在什么配置文件上加入呢,请明示
指定你的nameserver为这台机子的ip
不是吧,昏,几天过去了都没有谁来帮我一下?
怎么没谁来帮我一下啊,昏,这论坛上没高手吗?