免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1999 | 回复: 9
打印 上一主题 下一主题

[DNS] linux下的DNS配置??? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-11-15 17:08 |只看该作者 |倒序浏览
我在RH9下配置了DNS,用NSLOOKUP可以解析,但我在另一台WINDOWS系统的机子上把DNS设为RH9的IP,可以PING通IP,但PING不同域名,请问是怎么回事啊

论坛徽章:
0
2 [报告]
发表于 2004-11-15 17:16 |只看该作者

linux下的DNS配置???

你在本机上PING 域名通吗?

论坛徽章:
0
3 [报告]
发表于 2004-11-15 17:18 |只看该作者

linux下的DNS配置???

可以通

论坛徽章:
0
4 [报告]
发表于 2004-11-15 17:20 |只看该作者

linux下的DNS配置???

那你在WIN的机器上nslookup到DNS吗?

论坛徽章:
0
5 [报告]
发表于 2004-11-15 17:33 |只看该作者

linux下的DNS配置???

[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.

论坛徽章:
0
6 [报告]
发表于 2004-11-15 17:39 |只看该作者

linux下的DNS配置???

[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

论坛徽章:
0
7 [报告]
发表于 2004-11-15 17:46 |只看该作者

linux下的DNS配置???

[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

论坛徽章:
0
8 [报告]
发表于 2004-11-15 18:00 |只看该作者

linux下的DNS配置???

你在win上 ping linux??对么?
service iptables status 看看是不是看着的?
ping用的是icmp .如果win上nslookup没有问题.
就不是你linux 的bind问题.
看看物理link和iptables.

论坛徽章:
0
9 [报告]
发表于 2004-11-15 18:03 |只看该作者

linux下的DNS配置???

是在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]#

论坛徽章:
0
10 [报告]
发表于 2004-11-16 12:21 |只看该作者

linux下的DNS配置???

好像少了个文件啊!在named.conf中加入:
zone "100.100.192.in-addr.arpa" IN  {
type master;
file "100.100.192.file";
}


之后再在/var/named/下建立100.100.192.file文件编辑它:参考以下设置规则。我记不清我的的了!!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP