一.配置系统
centos7.6
关闭selinux firewalld
网卡设置里dns先不用配置
在resolv.conf里配置nameserver 127.0.0.1linux
二.安装dnsmasq
yum install -y dnsmasqgit
三.简单配置dnsmasqgithub
配置/etc/dnsmasq.confweb
#dnsmasq config, for a complete example, see:
http://oss.segetech.com/intra/srv/dnsmasq.conf
#log all dns queries
#log-queries
#dont use hosts nameservers
no-resolv
#use google as default nameservers
server=192.168.29.1
server=8.8.4.4
server=8.8.8.8centos
#serve all .company queries using a specific nameserver浏览器
#explicitly define host-ip mappings bash
address=/www.westos.com/192.168.1.23app
下面能够写须要本身解析的域名和地址curl
配置完成后就可使用了ide
四.web-ui管理界面webproc搭建
下载webproc管理界面
https://github.com/jpillora/webproc
使用二进制安装
curl https://i.jpillora.com/webproc | bash
安装完成后启动
webproc --config /etc/dnsmasq.conf -- dnsmasq --no-daemon
后面的--no-daemon能够写成以守护进程启动--daemon
启动完成后能够在浏览器输入地址加端口号8080访问,没有帐号密码