【发布时间】:2012-05-12 19:08:06
【问题描述】:
我有两台电脑
1. 192.168.56.102 => winXP
2. 192.168.56.103 => ubuntu 10.04 (bind9 and apache2 installed)
我已将 simas.tes 注册到 192.168.56.103
我做了什么:
# vi /etc/bind/named.conf.local
zone "simas.tes" {
type master;
file "/etc/bind/zones/simas.tes.db";
};
zone "56.168.192.in-addr-arpa" {
type master;
file "/etc/bind/zones/rev.56.168.192.in-addr.arpa";
};
然后:
# vi /etc/bind/zones/simas.tes.db
simas.tes. IN SOA ns1.simas.tes. admin.simas.tes. (
2006081401
28800
3600
604800
38400
)
simas.tes. IN NS NS1.simas.tes.
simas.tes. IN MX 10 mta.simas.tes.
www IN A 192.168.56.103
mta IN A 192.168.56.103
ns1 IN A 192.168.56.103
然后:
# vi /etc/bind/zones/rev.56.168.192.in-addr.arpa
@ IN SOA ns1.simas.tes. admin.simas.tes. (
2006081401;
28800;
604600;
604800;
86400
)
IN NS ns1.simas.tes.
103 IN PTR simas.tes.
我的挖掘状态:
root@my-ubuntu:/var/www# dig simas.tes
; <<>> DiG 9.7.0-P1 <<>> simas.tes
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 9559
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;simas.tes. IN A
;; AUTHORITY SECTION:
simas.tes. 38400 IN SOA ns1.simas.tes. admin.simas.tes. 2006081401 28800 3600 604800 38400
;; Query time: 0 msec
;; SERVER: 192.168.56.103#53(192.168.56.103)
;; WHEN: Thu May 3 17:25:05 2012
;; MSG SIZE rcvd: 73
我的 nslookup 状态:
root@my-ubuntu:/var/www# nslookup simas.tes
Server: 192.168.56.103
Address: 192.168.56.103#53
*** Can't find simas.tes: No answer
现在我可以从 192.168.56.102(我的 winXP)访问 simas.tes 站点,但我无法 ping 到 simas.tes(而不是 192.168.56.103).. 我想念什么? .. 我只想知道如何成功 ping simas.tes。
【问题讨论】:
-
zone "0.168.192.in-addr.arpa" 在你的反向 DNS 中最好是 zone "56.168.192.in-addr.arpa"...
-
我的代码有问题,我已经把那个保留的 DNS 放在之前