dns服务器搭建 dnsmasq

dnsmasq

简单dns服务器dnsmasq

  • jpillora/dnsmasq 一个docker镜像,介绍页有教程
  • 高效搭建基于dnsmasq通过webui管理的dns服务器
  • 维护地址: http://10.60.44.54:5380
  • 用户名:admin
  • 密码:fingard@2
docker rm -f dnsmasq
docker run \
    -u root \
    --name dnsmasq \
    -d \
    -p 53:53/udp \
    -p 5380:8080\
    -v /data/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf \
    --log-opt "max-size=100m" \
    -e "HTTP_USER=admin" \
    -e "HTTP_PASS=fingard@2" \
    -e TZ=Asia/Shanghai \
    --restart always \
    jpillora/dnsmasq:1.1
docker logs -f dnsmasq

可以配置域名通配符

如何使用dnsmasq配置静态通配符子域

address=/.server.mydomain.com/192.168.0.3

/data/dnsmasq/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 cloudflare as default nameservers, prefer 1^4
server=114.114.114.114
server=4.2.2.2
strict-order
#serve all .company queries using a specific nameserver
#server=/company/10.0.0.1
#explicitly define host-ip mappings
#address=/myhost.company/10.0.0.2
 
address=/k8s-test/10.60.44.54
address=/kube-master-vip/10.60.44.219
address=/kube-master1/10.60.44.214
address=/kube-master2/10.60.44.216
address=/kube-box1/10.60.44.243
address=/kube-box2/10.60.44.251
address=/kube-box3/10.60.44.252
address=/hadoop3/10.60.44.54
address=/hadoop2/10.60.44.55
address=/rdc-test-57/10.60.44.57
address=/rdc-test-58/10.60.44.58
address=/rdc-test-59/10.60.44.59
address=/rdc-devops-14/10.60.44.14
address=/rdc-devops-15/10.60.44.15
address=/rdc-devops-16/10.60.44.16
address=/james.local/10.60.44.16
address=/mirrors.jenkins-ci.org/10.60.44.54

你可能感兴趣的:(服务器,运维)