options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
};
zone "." {
type hint;
file "named.ca";
};
zone "localhost" {
type master;
file "named.local";
};
zone "test.xzxj11.com" {
type master;
file "test.xzxj11.com.zone";
};
zone "0.0.127.in-addr.arpa" {
type master;
file "127.0.0.zone";
};
# Use with the following in named.conf, adjusting the allow list as needed:
key "rndc-key" {
algorithm hmac-md5;
secret "h0A4n6gBw60NPfmJCpB8wQ==";
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
# End of named.conf
#vi /var/named/test.xzxj11.com.zone
$TTL 1D
@ IN SOA @ root (
2004081201 ;serial
1H ;refresh
15M ;retry
1W ;expire
1D ) ;TTL
IN NS ns
ns IN A 192.168.1.121
www IN A 192.168.1.129
测试:
