DNS分离解析
实验环境:
一台内网(client)1块网卡;一台网关(dns)2块网卡;一台外网1块网卡
DNS服务器开启路由转发
[root@localhost ~]# vi /etc/sysctl.conf
net.ipv4.ip_forward = 1
[root@localhost ~]# sysctl -p
[root@localhost ~]# yum -y install bind
搭建局域网DNS服务器,要求使用单独的客户机解析
www.itxdl.cn 为 10.123.123.123
blog.itxdl.cn 为 11.123.123.123
[root@localhost ~]# vi /etc/named.conf
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";
allow-query { any; };
recursion yes;
修改区域文件
[root@localhost etc]# cp -p named.rfc1912.zones named.aa
[root@localhost etc]# cp -p named.rfc1912.zones named.bb
修改区域文件name.aa
修改区域文件name.bb
[root@localhost named]# cp -p named.localhost xdl.a.localhost
[root@localhost named]# cp -p named.empty xdl.b.empty
[root@localhost named]# cp -p named.empty xdl.a.empty
[root@localhost named]# cp -p named.localhost xdl.b.localhost
主机A测试解析blog.itxdl.cn
主机B测试www.itxdl.cn