- 论坛徽章:
- 0
|
小弟我近来在学习配置DNS,自己配了一个,感觉配置完全正确,用来解析公网的地址,也没有问题,只是
自己做的两个配置文件,做host测却无法通过,配置如下:
[root@learnlinux root]# cat /etc/named.conf
// generated by named-bootconf.pl
options {
directory "/var/named";
/*
* 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 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "learnlinux.net" {
type master;
file "learnlinux.net.hosts";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" {
type master;
file "192.168.1.rev";
allow-update { none; };
};
include "/etc/rndc.key";
[root@learnlinux root]# cat /var/named/
192.168.1.rev learnlinux.net.hosts localhost.zone named.ca named.local
[root@learnlinux root]# cat /var/named/learnlinux.net.hosts
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA wwj.learnlinux.net. root.wwj.learnlinux.net. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS wwj.learnlinux.net.
IN MX 4 wwj.learnlinux.net.
wwj IN A 192.168.1.213
`
www IN CNAME wwj.learnlinux.net.
[root@learnlinux root]# cat /var/named/192.168.1.rev
$TTL 86400
@ IN SOA wwj.learnlinux.net. root.wwj.learnlinux.net. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
IN NS wwj.learnlinux.net.
213 IN PTR wwj.learnlinux.net.
[root@learnlinux root]# services named restart
-bash: services: command not found
[root@learnlinux root]# service named restart
Í£Ö¹ named£º
named 己经运行 [root@learnlinux root]# host wwj.learnlinux.net
wwj.learnlinux.net has address 69.25.142.57
[root@learnlinux root]# host 192.168.1.213
Host 213.1.168.192.in-addr.arpa not found: 3(NXDOMAIN)
[root@learnlinux root]#
做正解析,弄出了个69.25.142.57,我配的是192.168.1.213,
反解析就更不行了,居然解析不出来,看了半天,也不知道问题在哪,望各位高人指点一下。 |
|