[root@server log]# yum install bind
vi /etc/anmed.conf 修改以下兩行
listen-on port 53 { 要listen的IP; };
allow-query { any; };
vi /etc/named.rfc1912.zones 加入zone
代碼: 選擇全部
zone "[color=#FF0000]test.lab[/color]" IN {
type master;
file "[color=#FF0000]test.lab[/color]";
allow-update { none; };
};
代碼: 選擇全部
$TTL 1D
@ IN SOA server.test.lab. root.server.test.lab. (
6 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
IN NS server
IN A 127.0.0.1
IN AAAA ::1
server.test.lab. IN A 10.1.1.254
/etc/init.d/named restart