答案:(师爱华 2002年10月30日 10:16)
在查阅许多DNS配置手册后,无法是照办还是修改,我始终没有配置正确,总是正向解析无法解析.最后,在一次配置中,突然灵机一动,终于配置成功。
下面是我配置DNS的实例:
1 所需配置文件:
/etc/named.conf 系统自带,需要配置
/etc/resolv.conf 系统自带,需要配置
/var/named/myqmail.com.db 系统没有,自已创建
/var/named/db.192.168.0.198 系统没有,自已创建
/var/named/named.local 系统自带,不需要修改
/var/named/named.ca 系统自带,不需要修改
2 相关工具
nslookup
说明:检测DNS是否配置正确的工具,系统自带。
3 配置方案
3.1 /etc/named.conf
说明:DNS主配置文件,定义了域数据库信息的基本参数和源点,该文件可以存放在本地或远程的服务器上。源文件:
// generated by named-bootconf.pl options { directory "/var/named"; /* * If there is a firewall between you and nameservers you want * to talk to, you might need to uncomment the query-source * directive below. Previous versions of BIND always asked * questions using port 53, but BIND 8.1 uses an unprivileged * port by default. */ // query-source address * port 53; }; // // a caching only nameserver config // controls { inet 127.0.0.1 allow { localhost; } keys { rndckey; }; }; zone "." IN { type hint; file "named.ca"; }; zone "localhost" IN { type master; file "localhost.zone"; allow-update { none; }; }; zone "0.0.127.in-addr.arpa" IN { type master; file "named.local"; allow-update { none; }; }; zone "myqmail.com" IN { type master; file "myqmail.com.db"; allow-update { none;}; }; zone "0.168.192.in-addr.arpa" IN{ type master; file "db.192.168.0.198"; allow-update { none;}; }; include "/etc/rndc.key";
上一个:redhat7.2 DNS配置笔记 下一个:主DNS服务器
|