当前位置: > Linux服务器 > DNS >

CentOS安装配置dnsmasq域名拦截服务应用

时间:2014-12-11 01:10来源:linux.it.net.cn 作者:IT
CentOS安装配置dnsmasq域名拦截服务应用
 
yum install dnsmasq
 
cp /etc/dnsmasq.conf /etc/dnsmasq.conf-old
 
#主配置文件
sudo vim /etc/dnsmasq.conf
address=/www.test01.com/192.168.0.12
address=/www.test02.com/192.168.0.13
resolv-file=/etc/resolv.dnsmasq.conf
# Set the cachesize here.
#cache-size=150
cache-size=10000
 
 
#下一跳域名解析
vim /etc/resolv.dnsmasq.conf  
nameserver 8.8.8.8
 
 
/etc/init.d/dnsmasq start
netstat -nlp |grep 53
 
/etc/init.d/iptables stop
 
客户机测试(dns地址指向dnsmasq主机)

 
(责任编辑:IT)
------分隔线----------------------------