dnsmasq

cp /etc/resolv.conf  /etc/resolv.dnsmasq.conf

cp /etc/hosts /etc/dnsmasq.hosts

cp /etc/dnsmasq.conf /etc/dnsmasq-default.conf

 

 

cat /etc/dnsmasq.conf 

user=root

 

# default /etc/resolv.conf

resolv-file=/etc/resolv.dnsmasq.conf

 

strict-order

 

#no-hosts

 

addn-hosts=/etc/dnsmasq.hosts

 

listen-address=192.168.1.136,127.0.0.1

 

 

cat /etc/resolv.conf 

nameserver 192.168.1.226

nameserver 192.168.0.15

nameserver 127.0.0.1

 

 

cat /etc/resolv.dnsmasq.conf 

nameserver 192.168.1.226

nameserver 192.168.0.15

nameserver 127.0.0.1

nameserver 8.8.8.8

nameserver 199.91.73.222

 

 

service dnsmasq status

 

/etc/init.d/dnsmasq status

 

chkconfig dnsmasq on

 

/etc/init.d/dnsmasq  restart

service dnsmasq restart

/usr/sbin/dnsmasq

/usr/sbin/dnsmasq -p 8053 --pid-file=<path>/dnsmasq.pid -N -o --listen-address=127.0.0.1

 

service dnsmasq stop

/etc/init.d/dnsmasq  stop

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326429096&siteId=291194637