Rootop 服务器运维与web架构

dnsmasq简单配置使用

[root@elk ~]# yum install -y dnsmasq

# 主配置文件
[root@elk ~]# cat /etc/dnsmasq.conf | grep -v “#” | grep -v “^$”

# 监听地址,必须指定具体ip
listen-address=192.168.1.50
no-hosts
conf-dir=/etc/dnsmasq.d

#all-servers表示对以下设置的所有server发起查询
#选择回应最快的一条作为查询结果返回
all-servers
server=8.8.8.8
server=114.114.114.114

# 手动指定解析
address=/www.rootop.org/192.168.1.1
address=/elk/192.168.1.50

# 启动,开机启动
[root@elk ~]# systemctl enable dnsmasq
[root@elk ~]# systemctl start dnsmasq

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/3778.html

作者:Venus

服务器运维与性能优化

评论已关闭。