Docker搭建
docker-dnsmasq支持通过web页面配置域名映射,镜像地址:
https://hub.docker.com/r/jpillora/dnsmasq
使用步骤如下:
1、在Docker宿主上创建 /home/gary/dnsmasq.conf 配置文件
1 | touch /home/gary/dnsmasq.conf |
2、docker run启动容器
1 | docker run \ |
HTTP_USER:web页面登录的管理员帐号
HTTP_PASS:web页面登录的管理员密码
3、通过 ip:5380 地址访问web页面,使用帐户密码登录后在线编辑 dnsmasq.conf 文件
我的dnsmasq.conf配置文件内容如下:
1 | server=192.168.1.8 |
项目地址:https://github.com/jpillora/docker-dnsmasq
直接安装
1 | yum install -y dnsmasq |
web-ui管理界面:https://github.com/jpillora/webproc
1 | webproc --configuration-file /etc/dnsmasq.conf -- dnsmasq --no-daemon |