免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
论坛 操作系统 BSD BIND问题
最近访问板块 发新帖
查看: 1734 | 回复: 6
打印 上一主题 下一主题

[FreeBSD] BIND问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2013-03-03 20:55 |只看该作者 |倒序浏览
本帖最后由 ulovko 于 2013-03-05 10:14 编辑

困扰了N天,就是无法成功。配置如下:

named.conf

// $FreeBSD: src/etc/namedb/named.conf,v 1.29.2.3.4.1 2010/12/21 17:09:25 kensmith Exp $
//
// Refer to the named.conf(5) and named(8) man pages, and the documentation
// in /usr/share/doc/bind9 for more details.
//
// If you are going to set up an authoritative 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 {
        // All file and path names are relative to the chroot directory,
        // if any, and should be fully qualified.
        directory        "/etc/namedb/working";
        pid-file        "/var/run/named/pid";
        dump-file        "/var/dump/named_dump.db";
        statistics-file        "/var/stats/named.stats";

// If named is being used only as a local resolver, this is a safe default.
// For named to be accessible to the network, comment this option, specify
// the proper IP address, or delete this option.
        listen-on        { 127.0.0.1; 192.168.0.2;};

// If you have IPv6 enabled on this system, uncomment this option for
// use as a local resolver.  To give access to the network, specify
// an IPv6 address, or the keyword "any".
//        listen-on-v6        { ::1; };

// These zones are already covered by the empty zones listed below.
// If you remove the related empty zones below, comment these lines out.
        disable-empty-zone "255.255.255.255.IN-ADDR.ARPA";
        disable-empty-zone "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.0.IP6.ARPA";
        disable-empty-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";

// 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 the 'forwarders' clause is not empty the default is to 'forward first'
// which will fall back to sending a query from your local server if the name
// servers in 'forwarders' do not have the answer.  Alternatively you can
// force your name server to never initiate queries of its own by enabling the
// following line:
//        forward only;

// If you wish to have forwarding configured automatically based on
// the entries in /etc/resolv.conf, uncomment the following line and
// set named_auto_forward=yes in /etc/rc.conf.  You can also enable
// named_auto_forward_only (the effect of which is described above).
//        include "/etc/namedb/auto_forward.conf";

        /*
           Modern versions of BIND use a random UDP port for each outgoing
           query by default in order to dramatically reduce the possibility
           of cache poisoning.  All users are strongly encouraged to utilize
           this feature, and to configure their firewalls to accommodate it.

           AS A LAST RESORT in order to get around a restrictive firewall
           policy you can try enabling the option below.  Use of this option
           will significantly reduce your ability to withstand cache poisoning
           attacks, and should be avoided if at all possible.

           Replace NNNNN in the example with a number between 49160 and 65530.
        */
        // query-source address * port NNNNN;
};

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

// The traditional root hints mechanism. Use this, OR the slave zones below.
zone "." { type hint; file "/etc/namedb/named.root"; };

/*        Slaving the following zones from the root name servers has some
        significant advantages:
        1. Faster local resolution for your users
        2. No spurious traffic will be sent from your network to the roots
        3. Greater resilience to any potential root server failure/DDoS

        On the other hand, this method requires more monitoring than the
        hints file to be sure that an unexpected failure mode has not
        incapacitated your server.  Name servers that are serving a lot
        of clients will benefit more from this approach than individual
        hosts.  Use with caution.

        To use this mechanism, uncomment the entries below, and comment
        the hint zone above.
*/


/*        Serving the following zones locally will prevent any queries
        for these zones leaving your network and going to the root
        name servers.  This has two significant advantages:
        1. Faster local resolution for your users
        2. No spurious traffic will be sent from your network to the roots
*/
// RFC 1912 (and BCP 32 for localhost)

// RFC 1912-style zone for IPv6 localhost address

// "This" Network (RFCs 1912 and 3330)

// Private Use Networks (RFC 1918)

// Link-local/APIPA (RFCs 3330 and 3927)

// TEST-NET-[1-3] for Documentation (RFC 5737)




// Router Benchmark Testing (RFC 3330)

// IANA Reserved - Old Class E Space

zone "zyhx.com" {
        type master;
        file "master/zyhx.com";
};

zyhx.com

$TTL    172800
@       IN      SOA     zyhx.com. root.zyhx.com. (      
2005100301 ; Serial
172800 ; Refresh
900     ; Retry
3600000 ; Expire
3600 ) ; Minimum
IN            NS              zyhx.com.   
IN            A               192.168.0.2
web       IN            A               192.168.0.2


DNS# tail /var/log/messages
Mar  4 04:45:05 DNS named[2525]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Mar  4 04:45:05 DNS named[2525]: corporation.  Support and training for BIND 9 are
Mar  4 04:45:05 DNS named[2525]: available at https://www.isc.org/support
Mar  4 04:45:05 DNS named[2525]: ----------------------------------------------------
Mar  4 04:45:05 DNS named[2525]: command channel listening on 127.0.0.1#953
Mar  4 04:45:05 DNS named[2525]: command channel listening on ::1#953
Mar  4 04:45:05 DNS named[2525]: zone zyhx.com/IN: has no NS records
Mar  4 04:45:05 DNS named[2525]: zone zyhx.com/IN: not loaded due to errors.
Mar  4 04:45:05 DNS named[2525]: all zones loaded
Mar  4 04:45:05 DNS named[2525]: running

没有任何错误提示。

论坛徽章:
0
2 [报告]
发表于 2013-03-04 08:30 |只看该作者
没人知道吗?

论坛徽章:
54
2017金鸡报晓
日期:2017-02-08 10:39:42操作系统版块每日发帖之星
日期:2016-03-08 06:20:00操作系统版块每日发帖之星
日期:2016-03-07 06:20:00操作系统版块每日发帖之星
日期:2016-02-22 06:20:00操作系统版块每日发帖之星
日期:2016-01-29 06:20:00操作系统版块每日发帖之星
日期:2016-01-27 06:20:00操作系统版块每日发帖之星
日期:2016-01-20 06:20:00操作系统版块每日发帖之星
日期:2016-01-06 06:20:0015-16赛季CBA联赛之江苏
日期:2015-12-21 20:00:24操作系统版块每日发帖之星
日期:2015-12-21 06:20:00IT运维版块每日发帖之星
日期:2015-11-17 06:20:002015亚冠之广州恒大
日期:2015-11-12 10:58:02
3 [报告]
发表于 2013-03-04 09:10 |只看该作者
Mar  4 04:45:05 DNS named[2525]: zone zyhx.com/IN: has no NS records
Mar  4 04:45:05 DNS named[2525]: zone zyhx.com/IN: not loaded due to errors.

论坛徽章:
0
4 [报告]
发表于 2013-03-05 10:10 |只看该作者
本帖最后由 ntdba 于 2013-03-05 10:11 编辑

Mar  5 02:09:16 DNS named[24990]: BIND 9 is maintained by Internet Systems Consortium,
Mar  5 02:09:16 DNS named[24990]: Inc. (ISC), a non-profit 501(c)(3) public-benefit
Mar  5 02:09:16 DNS named[24990]: corporation.  Support and training for BIND 9 are
Mar  5 02:09:16 DNS named[24990]: available at https://www.isc.org/support
Mar  5 02:09:16 DNS named[24990]: ----------------------------------------------------
Mar  5 02:09:16 DNS named[24990]: command channel listening on 127.0.0.1#953
Mar  5 02:09:16 DNS named[24990]: zone trueway.com.cn/IN: NS 'nds.trueway.com.cn' has no address records (A or AAAA)
Mar  5 02:09:16 DNS named[24990]: zone trueway.com.cn/IN: not loaded due to errors.

Mar  5 02:09:16 DNS named[24990]: all zones loaded
Mar  5 02:09:16 DNS named[24990]: running


各位高人,这个如何解决啊?

论坛徽章:
1
IT运维版块每日发帖之星
日期:2015-10-09 06:20:00
5 [报告]
发表于 2013-03-05 10:14 |只看该作者
要学会配置bind(域名服务器)估计要看一两本书才可以,没有可视化配置界面

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
6 [报告]
发表于 2013-03-05 10:15 |只看该作者
以后发代码请勾选 禁用表情,谢谢合作!(方便大家)

论坛徽章:
0
7 [报告]
发表于 2013-03-05 10:23 |只看该作者
本帖最后由 ntdba 于 2013-03-05 10:24 编辑

已经解决了。

trueway.com.cn.        IN        NS        nds.trueway.com.cn.
改为
trueway.com.cn.        IN        NS        nds.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP