当前位置: 技术问答>linux和unix
帮我看看DNS为什么不成功?拜托各位高手指点!!!
来源: 互联网 发布时间:2014-11-06
本文导语: 帮我看看DNS为什么不成功? 我的机子配置如下: OS:Redhat7.2 机器名:linux.william.com IP:192.168.1.144 我想把它配置成一台针对william.com的主DNS服务器,机子在内部网中。 我在这台机子上使用入下命令: [root@linux named]# pi...
帮我看看DNS为什么不成功?
我的机子配置如下:
OS:Redhat7.2
机器名:linux.william.com
IP:192.168.1.144
我想把它配置成一台针对william.com的主DNS服务器,机子在内部网中。
我在这台机子上使用入下命令:
[root@linux named]# ping linux 正常(肯定的)
[root@linux named]# ping mail.william.com
ping: unknown host mail.william.com
[root@linux init.d]# ping mail.william.com
ping: unknown host mail.william.com
[root@linux init.d]# nslookup mail.william.com
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.144
Address: 192.168.1.144#53
** server can't find mail.william.com.: SERVFAIL
配置时对下面的文件进行了修改:
/etc/hosts
/etc/named.conf
/etc/relov.conf
/var/named/named.192.168.1 反区数据文件
/var/named/named.william.com 正区数据文件
-----------------------------
[root@linux etc]# less hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.144 linux.william.com linux
-----------------------------
/etc/named.conf文件内容如下:
[root@linux etc]# less named.conf
options {
directory "/var/named";
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "william.com" IN {
type master;
file "named.william.com";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "named.192.168.1";
allow-update { none; };
};
include "/etc/rndc.key";
------------------------------
/etc/relov.conf文件内容如下:
[root@linux etc]# less resolv.conf
search william.com
nameserver 192.168.1.144
------------------------------
/var/named/named.192.168.1内容如下:
[root@linux named]# less named.192.168.1
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA linux.william.com. root.linux.william.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS linux.william.com.
1D IN MX 10 mail.william.com.
1 IN PTR linux.william.com.
------------------------------
/var/named/named.william.com内容如下:
[root@linux named]# less named.william.com
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA linux.william.com. root.linux.william.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS linux.william.com.
1D IN MX 10 mail.william.com.
linux IN A 192.168.1.144
mail IN A 192.168.1.144
pop3 IN A 192.168.1.144
smtp IN A 192.168.1.144
mail IN CNAME linux
我的机子配置如下:
OS:Redhat7.2
机器名:linux.william.com
IP:192.168.1.144
我想把它配置成一台针对william.com的主DNS服务器,机子在内部网中。
我在这台机子上使用入下命令:
[root@linux named]# ping linux 正常(肯定的)
[root@linux named]# ping mail.william.com
ping: unknown host mail.william.com
[root@linux init.d]# ping mail.william.com
ping: unknown host mail.william.com
[root@linux init.d]# nslookup mail.william.com
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.144
Address: 192.168.1.144#53
** server can't find mail.william.com.: SERVFAIL
配置时对下面的文件进行了修改:
/etc/hosts
/etc/named.conf
/etc/relov.conf
/var/named/named.192.168.1 反区数据文件
/var/named/named.william.com 正区数据文件
-----------------------------
[root@linux etc]# less hosts
127.0.0.1 localhost.localdomain localhost
192.168.1.144 linux.william.com linux
-----------------------------
/etc/named.conf文件内容如下:
[root@linux etc]# less named.conf
options {
directory "/var/named";
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "william.com" IN {
type master;
file "named.william.com";
allow-update { none; };
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "named.192.168.1";
allow-update { none; };
};
include "/etc/rndc.key";
------------------------------
/etc/relov.conf文件内容如下:
[root@linux etc]# less resolv.conf
search william.com
nameserver 192.168.1.144
------------------------------
/var/named/named.192.168.1内容如下:
[root@linux named]# less named.192.168.1
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA linux.william.com. root.linux.william.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS linux.william.com.
1D IN MX 10 mail.william.com.
1 IN PTR linux.william.com.
------------------------------
/var/named/named.william.com内容如下:
[root@linux named]# less named.william.com
$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA linux.william.com. root.linux.william.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
1D IN NS linux.william.com.
1D IN MX 10 mail.william.com.
linux IN A 192.168.1.144
mail IN A 192.168.1.144
pop3 IN A 192.168.1.144
smtp IN A 192.168.1.144
mail IN CNAME linux
|
大致看了一下你的配置,没有什么明显的问题。
不知道你有没有把NAMED那个进程重新启动?
在本地运行NSLOOKU!P出现什么样的提示?
在你问题开头所提到的提示是你配置之前还是之后的?
不知道你有没有把NAMED那个进程重新启动?
在本地运行NSLOOKU!P出现什么样的提示?
在你问题开头所提到的提示是你配置之前还是之后的?
|
144 IN PTR ,不是1
|
看提示,倒是真的说你的文件配置不对呢,现在有没有好?
要不你用WEBMIN来配置?
要不你用WEBMIN来配置?
|
/etc/resolv.conf中应显示
domain william.com
search william.com
nameserver 192.168.1.144
domain william.com
search william.com
nameserver 192.168.1.144