DNS配置模板

《按ctrl+A全选复制粘贴》

DNS主配置文件

options {

directory "/var/named" ;

/*

- If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.

- If you are building a RECURSIVE (caching) DNS server, you need to enable

recursion.

- If your recursive DNS server has a public IP address, you MUST enable access

control to limit queries to your legitimate users. Failing to do so will

cause your server to become part of large scale DNS amplification

attacks. Implementing BCP38 within your network would greatly

reduce such attack surface

*/

};

logging {

channel default_debug {

file "data/named.run";

severity dynamic;

};

};

zone "." IN {

type hint;

file "named.ca";

};

zone "test.org" IN {

type master;

file "test.org";

};

zone "221.168.192.in-addr.arpa" IN {

type master;

file "221.168.192";

};

include "/etc/named.rfc1912.zones";

include "/etc/named.root.key";

正向解析模板

$TTL 86400

test.org. IN SOA dns.test.org. root.test.org (

2017121314 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

86400 ) ; Minimum

test.org. IN NS dns.test.org.

dns IN A 192.168.202.100

aaa IN A 192.168.202.110

反向解析模板

$TTL 86400

@ IN SOA 202.168.192.in-addr.arpa root.test.org (

2017121314 ; Serial

28800 ; Refresh

14400 ; Retry

3600000 ; Expire

86400 ) ; Minimum

@ IN NS dns.test.org.

100 IN PTR dns.test.org.

110 IN PTR aaa.test.org.