安装dnsmasq
[root@route-a ~]# wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.70.tar.gz
[root@route-a ~]# tar zxvf dnsmasq-2.70.tar.gz
[root@route-a ~]# cd dnsmasq-2.70
[root@route-a ~]# make install
查看dnsmasq是否支持ipset
[root@route-a ~]# dnsmasq -v
Dnsmasq version 2.70 Copyright (c) 2000-2014 Simon Kelley
Compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-
conntrack ipset auth no-DNSSEC
This software comes with ABSOLUTELY NO WARRANTY.
Dnsmasq is free software, and you are welcome to redistribute it
under the terms of the GNU General Public License, version 2 or 3.
配置dnsmasq
[root@route-a ~]# vim /etc/dnsmasq.conf
...
server=/.com/114.114.114.114
conf-dir=/etc/dnsmasq.d
[root@route-a ~]# vim /etc/dnsmasq.d/domain.conf