Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1079425
  • 博文数量: 165
  • 博客积分: 3900
  • 博客等级: 中校
  • 技术积分: 1887
  • 用 户 组: 普通用户
  • 注册时间: 2007-04-06 15:15
文章分类

全部博文(165)

文章存档

2020年(3)

2019年(8)

2017年(2)

2016年(8)

2015年(14)

2013年(15)

2012年(32)

2011年(11)

2010年(14)

2009年(7)

2008年(20)

2007年(31)

分类: LINUX

2015-04-22 10:32:09

1. named.conf.local
zone "xxx.com" {
type master;
file "/etc/bind/zones/xxx.db";
};

2. /etc/bind/zones/xxx.db
;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     local.caredear root.local.caredear (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      localhost.
@       IN      A       127.0.0.1
@       IN      AAAA    ::1
;talk   IN      A       192.168.1.245

3. 配置forward first(named.conf.options)
options {
        directory "/var/cache/bind";


        // If there is a firewall between you and nameservers you want
        // to talk to, you may need to fix the firewall to allow multiple
        // ports to talk.  See


        // If your ISP provided one or more IP addresses for stable
        // nameservers, you probably want to use them as forwarders.
        // Uncomment the following block, and insert the addresses replacing
        // the all-0's placeholder.
        forward first;
        forwarders {
                223.5.5.5;
                114.114.114.114;
         };
        allow-query {
                any;
        };


        //========================================================================
        // If BIND logs error messages about the root key being expired,
        // you will need to update your keys.  See
        //========================================================================
        dnssec-validation auto;


        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};


key "rndc-key" {
        algorithm hmac-md5;
        secret "B7DFyJprYRYtSvsqAuzzdA==";
};


4. ping talk.xxx.com
阅读(1237) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~