Bind 配置非递归服务器

  • 作为test.com的权威服务器
  • 非递归服务器
  • 将bind chroot在/usr/local/bind/chroot


安装

wget http://www.bind.com/pub/bind9/9.7.2rc1/bind-9.7.2rc1.tar.gz
tar zxf bind-9.7.2rc1.tar.gz
cd bind-9.7.2rc1/
./configure --prefix=/usr/local/bind --enable-epoll --enable-threads
make && make install
#建立chroot相关文件
mkdir /usr/local/bind/chroot
cd /usr/local/bind/chroot
mkdir -p dev etc var/{run,log}
#建立dev文件
mknod dev/null c 1 3
mknod dev/random c 1 8
chmod 666 dev/{null,random}
#将localtime拷贝至etc目录下
cp /etc/localtime etc
#建立用户
useradd -M -s /sbin/nologin named

配置文件

#named.conf
key "rndc-key" {
        algorithm hmac-md5;
        secret "xxxxxxxxxxxxxxxxxxxxxxx";
};

controls { inet 127.0.0.1 port 953 allow { 127.0.0.1; } keys { "rndc-key"; }; };

acl "myserver" { 127.0.0.1; };

logging {
    channel default {
        file "/var/log/named.log" versions 2 size 10k;
        severity debug;
        print-time yes;
        print-severity yes;
        print-category yes;
    };
};

options {
    directory "/";
    pid-file "/var/run/named.pid";
    notify yes;
    recursion no;
    zone-statistics yes;
    statistics-file "/var/log/dns-stats.log";
    allow-transfer { "myserver"; };
    allow-query { any; };
    listen
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值