centos下配置named的DNS服务器,首先按一般流程配置(略)
当需要配置只有主机名,没有域名的情况时,主要是两点:
1、在/etc/named.rfc1912.zones里面添加:
zone "." IN { type master; file "hostname.nodomain"; allow-update { any; }; };
2、在/var/named/hostname.nodomain里对应:
$TTL 1D @ IN SOA @ . ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS @ A 127.0.0.1 AAAA ::1 file1 IN A 10.1.1.1 file2 IN A 10.1.1.2 ad1 IN A 10.1.1.12 ad2 IN A 10.1.1.13 mail IN A 10.1.1.14
重启named服务生效配置
检查可以直接ping file1或者nslookup file1
标签:10.1,named,配置,file1,域名,DNS,服务器 From: https://www.cnblogs.com/d9394/p/16734843.html