linux下的DNS配置???
我在RH9下配置了DNS,用NSLOOKUP可以解析,但我在另一台WINDOWS系统的机子上把DNS设为RH9的IP,可以PING通IP,但PING不同域名,请问是怎么回事啊
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我在RH9下配置了DNS,用NSLOOKUP可以解析,但我在另一台WINDOWS系统的机子上把DNS设为RH9的IP,可以PING通IP,但PING不同域名,请问是怎么回事啊
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(9)
[root@liunx80 etc]# nslookup www.xxx.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: 127.0.0.1
Address: 127.0.0.1#53
Name: www.xxx.com
Address: 192.100.100.3
[root@liunx80 etc]# ping www.xxx.com
PING www.xxx.com (192.100.100.3) from 192.100.100.3 : 56(84) bytes of data.
64 bytes from www.xxx.com (192.100.100.3): icmp_seq=1 ttl=64 time=0.031 ms
64 bytes from www.xxx.com (192.100.100.3): icmp_seq=2 ttl=64 time=0.028 ms
--- www.xxx.com ping statistics ---
2 packets transmitted, 2 received, 0% loss, time 999ms
rtt min/avg/max/mdev = 0.028/0.029/0.031/0.005 ms
C:\>;nslookup www.xxx.com
*** Can't find server name for address 192.100.100.3: No response from server
*** Default servers are not available
Server: UnKnown
Address: 192.100.100.3
*** UnKnown can't find www.xxx.com: No response from server
C:\>;ping www.xxx.com
Unknown host www.xxx.com.
[root@liunx80 etc]# more 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 "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 "xxx.com" IN {
type master;
file "xxx.com.zone";
allow-update { none; };
};
include "/etc/rndc.key";
[root@liunx80 etc]#
[root@liunx80 etc]#
[root@liunx80 etc]# more /var/named/xxx.com.zone
$TTL 86400
$ORIGIN xxx.com.
@ 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
www 1D IN A 192.100.100.3
[root@liunx80 etc]#
[root@liunx80 etc]# more hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 liunx80 liunx80
192.100.100.3 www.xxx.com
192.100.100.8 www.zzz.com
[root@liunx80 etc]# more resolv.conf
search localdomain
192.100.100.3
192.100.100.56
[root@liunx80 etc]# rpm -qa|grep bind
ypbind-1.11-2
bind-9.2.1-9
redhat-config-bind-1.8.1-18
bind-utils-9.2.1-9
你在win上 ping linux??对么?
service iptables status 看看是不是看着的?
ping用的是icmp .如果win上nslookup没有问题.
就不是你linux 的bind问题.
看看物理link和iptables.
是在WIN上ping的LINUX
[root@liunx80 etc]# service iptables status
表格:filter
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Lokkit-0-50-INPUT all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Chain RH-Lokkit-0-50-INPUT (1 references)
target prot opt source destination
ACCEPT tcp -- anywhere anywhere tcp dpt:smtp flags:S
YN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:http flags:S
YN,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp flags:SY
N,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:ssh flags:SY
N,RST,ACK/SYN
ACCEPT tcp -- anywhere anywhere tcp dpt:telnet flags
:SYN,RST,ACK/SYN
ACCEPT udp -- anywhere anywhere udp spts:bootps:boot
pc dpts:bootps:bootpc
ACCEPT udp -- anywhere anywhere udp spts:bootps:boot
pc dpts:bootps:bootpc
ACCEPT all -- anywhere anywhere
REJECT tcp -- anywhere anywhere tcp dpts:0:1023 flag
s:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpt:nfs flags:SY
N,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpts:0:1023 reje
ct-with icmp-port-unreachable
REJECT udp -- anywhere anywhere udp dpt:nfs reject-w
ith icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dpts11:6009 fl
ags:SYN,RST,ACK/SYN reject-with icmp-port-unreachable
REJECT tcp -- anywhere anywhere tcp dptfs flags:SY
N,RST,ACK/SYN reject-with icmp-port-unreachable
[root@liunx80 etc]#
好像少了个文件啊!在named.conf中加入:
zone "100.100.192.in-addr.arpa" IN {
type master;
file "100.100.192.file";
}
之后再在/var/named/下建立100.100.192.file文件编辑它:参考以下设置规则。我记不清我的的了!!!!
你在本机上PING 域名通吗?
可以通
那你在WIN的机器上nslookup到DNS吗?