免费注册 查看新帖 |

Chinaunix

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

[DNS] DNS服务器安好后,我ping xzh.loveyou.com不通 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-05-27 15:51 |只看该作者 |倒序浏览
BIND 安装好配置好,运行后,是不是我能ping 通我的域名
现在我只能ping 通ip,怎么办啊!后面有我的配置文件

论坛徽章:
0
2 [报告]
发表于 2004-05-27 15:56 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

// $FreeBSD: src/etc/namedb/named.conf,v 1.6.2.7 2003/02/13 13:16:51 keramida Exp $
//
// Refer to the named.conf(5) and named( man pages for details.  If
// you are ever going to set up a primary server, make sure you
// understand the hairy details of how DNS works.  Even with
// simple mistakes, you can break connectivity for affected parties,
// or cause huge amounts of useless Internet traffic.

options {
        directory "/etc/namedb";

// In addition to the "forwarders" clause, you can force your name
// server to never initiate queries of its own, but always ask its
// forwarders only, by enabling the following line:
//
//      forward only;

// If you've got a DNS server around at your upstream provider, enter
// its IP address here, and enable the line below.  This will make you
// benefit from its cache, thus reduce overall DNS traffic in the Internet.
/*
        forwarders {
                127.0.0.1;
        };
*/
        /*
         * 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;

        /*
         * If running in a sandbox, you may have to specify a different
         * location for the dumpfile.
         */
        // dump-file "s/named_dump.db";
};

// Note: the following will be supported in a future release.
/*
host { any; } {
        topology {
                127.0.0.0/8;
        };
};
*/

// Setting up secondaries is way easier and a rough example for this
// is provided below.
//
// If you enable a local name server, don't forget to enter 127.0.0.1
// first in your /etc/resolv.conf so this server will be queried.
// Also, make sure to enable it in /etc/rc.conf.

zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "localhost.rev";
};
zone "0.0.10.in-addr.arpa" {
type master;
file "/etc/namedb/rev/10.0.0.rev";
};
zone "loveyou.com" {
type master;
file "/etc/namedb/hosts/loveyou.com.hosts";
};
// RFC 3152
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA" {
        type master;
        file "localhost-v6.rev";
};

// RFC 1886 -- deprecated
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.INT" {
        type master;
        file "localhost-v6.rev";
};

// NB: Do not use the IP addresses below, they are faked, and only
// serve demonstration/documentation purposes!
//
// Example secondary config entries.  It can be convenient to become
// a secondary at least for the zone your own domain is in.  Ask
// your network administrator for the IP address of the responsible
// primary.
//
// Never forget to include the reverse lookup (IN-ADDR.ARPA) zone!
// (This is named after the first bytes of the IP address, in reverse
// order, with ".IN-ADDR.ARPA" appended.)
//
// Before starting to set up a primary zone, make sure you fully
// understand how DNS and BIND works.  There are sometimes
// non-obvious pitfalls.  Setting up a secondary is simpler.
//
// NB: Don't blindly enable the examples below.   Use actual names
// and addresses instead.
//
// NOTE!!! FreeBSD can run bind in a sandbox (see named_flags in rc.conf).
// The directory containing the secondary zones must be write accessible
// to bind.  The following sequence is suggested:
//
//        mkdir /etc/namedb/s
//        chown bind:bind /etc/namedb/s
//        chmod 750 /etc/namedb/s

/*
zone "domain.com" {
        type slave;
        file "s/domain.com.bak";
        masters {
                192.168.1.1;
        };
};

zone "0.168.192.in-addr.arpa" {
        type slave;
        file "s/0.168.192.in-addr.arpa.bak";
        masters {
                192.168.1.1;
        };
};
*/

论坛徽章:
0
3 [报告]
发表于 2004-05-27 16:01 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

这是loveyou.com.hosts文件
;        From: @(#)localhost.rev        5.1 (Berkeley) 6/30/90
; $FreeBSD: src/etc/namedb/PROTO.localhost.rev,v 1.6 2000/01/10 15:31:40 peter Exp $
;
; This file is automatically edited by the `make-localhost' script in
; the /etc/namedb directory.
;

$TTL        3600

@        IN        SOA        xzh.loveyou.com. root.xzh.loveyou.com.  (
                                20040526        ; Serial
                                3600        ; Refresh
                                900        ; Retry
                                3600000        ; Expire
                                3600 )        ; Minimum
        IN        NS        xzh.loveyou.com.
        IN      MX      10 xzh.loveyou.com.
xzh      IN      A       10.0.0.11
xzh    IN      A       10.0.0.11

论坛徽章:
0
4 [报告]
发表于 2004-05-27 16:17 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

// $FreeBSD: src/etc/namedb/named.conf,v 1.6.2.7 2003/02/13 13:16:51 keramida Exp $
//
// Refer to the named.conf(5) and named( man pages for details.  If
// you are ever going to set up a primary server, make sure you
// understand the hairy details of how DNS works.  Even with
// simple mistakes, you can break connectivity for affected parties,
// or cause huge amounts of useless Internet traffic.

options {
        directory "/etc/namedb";

// In addition to the "forwarders" clause, you can force your name
// server to never initiate queries of its own, but always ask its
// forwarders only, by enabling the following line:
//
//      forward only;

// If you've got a DNS server around at your upstream provider, enter
// its IP address here, and enable the line below.  This will make you
// benefit from its cache, thus reduce overall DNS traffic in the Internet.
/*
        forwarders {
                127.0.0.1;
        };
*/
        /*
         * 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;

        /*
         * If running in a sandbox, you may have to specify a different
         * location for the dumpfile.
         */
        // dump-file "s/named_dump.db";
};

// Note: the following will be supported in a future release.
/*
host { any; } {
        topology {
                127.0.0.0/8;
        };
};
*/

// Setting up secondaries is way easier and a rough example for this
// is provided below.
//
// If you enable a local name server, don't forget to enter 127.0.0.1
// first in your /etc/resolv.conf so this server will be queried.
// Also, make sure to enable it in /etc/rc.conf.

zone "." {
        type hint;
        file "named.root";
};

zone "0.0.127.IN-ADDR.ARPA" {
        type master;
        file "localhost.rev";
};
zone "0.0.10.in-addr.arpa" {
type master;
file "/etc/namedb/rev/10.0.0.rev";
};
zone "loveyou.com" {
type master;
file "/etc/namedb/hosts/loveyou.com.hosts";
};
// RFC 3152
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA" {
        type master;
        file "localhost-v6.rev";
};

// RFC 1886 -- deprecated
zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.INT" {
        type master;
        file "localhost-v6.rev";
};

// NB: Do not use the IP addresses below, they are faked, and only
// serve demonstration/documentation purposes!
//
// Example secondary config entries.  It can be convenient to become
// a secondary at least for the zone your own domain is in.  Ask
// your network administrator for the IP address of the responsible
// primary.
//
// Never forget to include the reverse lookup (IN-ADDR.ARPA) zone!
// (This is named after the first bytes of the IP address, in reverse
// order, with ".IN-ADDR.ARPA" appended.)
//
// Before starting to set up a primary zone, make sure you fully
// understand how DNS and BIND works.  There are sometimes
// non-obvious pitfalls.  Setting up a secondary is simpler.
//
// NB: Don't blindly enable the examples below.   Use actual names
// and addresses instead.
//
// NOTE!!! FreeBSD can run bind in a sandbox (see named_flags in rc.conf).
// The directory containing the secondary zones must be write accessible
// to bind.  The following sequence is suggested:
//
//        mkdir /etc/namedb/s
//        chown bind:bind /etc/namedb/s
//        chmod 750 /etc/namedb/s

/*
zone "domain.com" {
        type slave;
        file "s/domain.com.bak";
        masters {
                192.168.1.1;
        };
};

zone "0.168.192.in-addr.arpa" {
        type slave;
        file "s/0.168.192.in-addr.arpa.bak";
        masters {
                192.168.1.1;
        };
};
*/

论坛徽章:
0
5 [报告]
发表于 2004-05-28 10:41 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

1. 用看named起来没有:ps ax
2. 再看能不能解析:nslookup

论坛徽章:
0
6 [报告]
发表于 2004-05-28 12:28 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

查一下resolv.conf里写的是什么

论坛徽章:
0
7 [报告]
发表于 2004-05-28 16:59 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

named起来了的,也能解析

论坛徽章:
0
8 [报告]
发表于 2004-05-28 17:01 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

这是我的resolv.conf
searsh loveyou.com
nameserver 127.0.0.1
nameserver  61.139.xxx.xxx

论坛徽章:
0
9 [报告]
发表于 2004-05-28 17:10 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

这是我的resolv.conf
searsh loveyou.com
nameserver 127.0.0.1
nameserver  61.139.xxx.xxx

论坛徽章:
0
10 [报告]
发表于 2004-05-28 19:41 |只看该作者

DNS服务器安好后,我ping xzh.loveyou.com不通

能解析说明DNS正常
能解析与能ping是两码事,假如防火墙拒绝ping,就ping不通,一些路由器如果拒绝ping,同样也ping不通。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP