DNS基础服务搭建

2022-09-19 10:53:43 浏览数 (1)

主配置文件修改/etc/named.conf

代码语言:javascript复制
options {
	listen-on port 53 { any; };
	listen-on-v6 port 53 { ::1; };
	directory 	"/var/named";
	dump-file 	"/var/named/data/cache_dump.db";
	statistics-file "/var/named/data/named_stats.txt";
	memstatistics-file "/var/named/data/named_mem_stats.txt";
	recursing-file  "/var/named/data/named.recursing";
	secroots-file   "/var/named/data/named.secroots";
	allow-query     { any; };

区域配置文件修改/etc/named.rfc1912.zones

代码语言:javascript复制
zone "2204.cn" IN {
	type master;
	allow-transfer { 192.168.3.23; };
	file "named.localhost";
};
#zone "1.0.0.127.in-addr.arpa" IN {
#	type master;
#	file "named.loopback";
#	allow-update { none; };
#};

数据配置文件/var/named/named.localhost

代码语言:javascript复制
$TTL 1D
@	IN SOA	2204.cn.  rname.invalid. (
					0	; serial
					1D	; refresh
					1H	; retry
					1W	; expire
					3H )	; minimum
	NS	dns.2204.cn.
dns	A	192.168.3.13
www	A	192.168.3.13

0 人点赞