网络bind服务

网络bind服务配置

bind,自建dns服务器

服务端 10.0.0.11 bind

yum install bind bind-utils -y
vim /etc/named.conf
listen-on port 53 { any; };
allow-query     { any; };
zone "oldboyedu.com" IN {
type master;
file "oldboyedu.com.zone";
}
vim /var/named/oldboyedu.com.zone
$TTL 1D
@ IN SOA  @  dns.oldboyedu.com. (
                   0  ; serial
                   1D ; refresh
                   1H ; retry
                   1W ; expire
                   3H )   ; minimum
  NS  @
      A          10.0.0.1;
www   A          10.0.0.100;
bbs   A          10.0.0.11;
chown -R named:named     oldboyedu.com.zone
named-checkconf
systemctl start named
systemctl enable named
netstat-tnulp    53端口

客户端服务器 10.0.0.12 test

yum install bind bind-utils -y
dig @10.0.0.11 bbs.oldboyedu.com
vim /etc/resolv.conf
nameserver 10.0.0.11
nameserver 10.0.0.100
posted @ 2021-03-07 23:19  上善若水~小辉  阅读(93)  评论(0编辑  收藏  举报