dns配置路径
/etc/named.conf
/var/named/chroot/var/named - localhost.zone
服务重启动 service named restart
dns转发:在option括号里面添加
forwarders {202.96.128.86;};
---------------------------------------------------------------------------
正向 cwen.com.zone
@ IN SOA dns.cwen.com. root.cwen.com.
@ IN NS dns.cwen.com.
dns IN A 192.168.10.30
www IN A 20.12.22.254
cn IN CNAME dns.cwen.com.
@ IN MX 5 mail.cwen.com.
mail IN A 192.168.10.20
---------------------------------------------------------------------------
反向 10.168.192.zone
@ IN SOA dns.cwen.com. root.cwen.com.
@ IN NS dns.cwen.com.
30 IN PTR dns.cwen.com.
30 IN PTR cn.cwen.com.
20 IN PTR mail.cwen.com.
---------------------------------------------------------------------------
反向 22.12.20.zone
@ IN SOA dns.cwen.com. root.cwen.com.
@ IN NS dns.cwen.com.
254 IN PTR www.cwen.com.
正向注释
IN NS表示域名服务器记录,用于设置DNS服务器名称
IN A表示A记录,用于设置主机名对应IP地址的对应记录
IN CNAME为别名记录,用于在区域文件中对主机名称设置别名
IN MX为邮件服务器记录,用于提供邮件服务器名称