dnsmasq搭建及web-ui管理界面webproc搭建

一.配置系統
centos7.6
關閉selinux firewalld
網卡設置裏dns先不用配置
在resolv.conf裏配置nameserver 127.0.0.1

二.安裝dnsmasq
yum install -y dnsmasq

三.簡單配置dnsmasq

配置/etc/dnsmasq.conf

#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.8

#serve all .company queries using a specific nameserver

#explicitly define host-ip mappings

address=/www.westos.com/192.168.1.23

下面可以寫需要自己解析的域名和地址

配置完成後就可以使用了

四.web-ui管理界面webproc搭建
下載webproc管理界面
https://github.com/jpillora/webproc

使用二進制安裝
dnsmasq搭建及web-ui管理界面webproc搭建

curl https://i.jpillora.com/webproc | bash

安裝完成後啓動
webproc --config /etc/dnsmasq.conf -- dnsmasq --no-daemon
後面的--no-daemon可以寫成以守護進程啓動--daemon

啓動完成後可以在瀏覽器輸入地址加端口號8080訪問,沒有賬號密碼
dnsmasq搭建及web-ui管理界面webproc搭建

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章