1 下载源码
wget http://www.thekelleys.org.uk/dnsmasq/dnsmasq-2.45.tar.gz
cp dnsmasq-2.45.tar.gz /usr/src
tar zxvf dnsmasq-2.45.tar.gz
2 编译安装
cd /usr/src/dnsmasq-2.45
make install
cp dnsmasq.conf.example /etc/dnsmasq.conf
mkdir -p /etc/dnsmasq.d
3 配置
vi /etc/dnsmasq.conf
##########
resolv-file=/etc/dnsmasq.d/dnsmasq.resolv.conf
strict-order
listen-address= 192.168.1.xx
addn-hosts=/etc/dnsmasq.d/dnsmasq.hosts
在/etc/dnsmasq.d目录下新建2个文件
dnsmasq.resolv.conf
nameserver 8.8.8.8
dnsmasq.hosts
ip domain
4 安装dig&nslookup
Ubuntu:
sudo apt-get install dnsutils
Fedora / Centos:
yum install bind-utils
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。