原创, 服务器

Dnsmasq 在Ubuntu上部署

安装dnsmasq

apt install dnsmasq

添加内网解析

vim /etc/dnsmasq.d/server-internal.conf

address=/skywalking/{本机的内网IP地址}
address=/abc/10.0.0.10
vim /etc/dnsmasq.conf

domain-needed
bogus-priv
no-resolv
server=/localnet/{本机的内网IP地址}
local=/localnet/
conf-dir=/etc/dnsmasq.d/,*.conf
systemctl restart dnsmasq
vim /etc/resolv.conf

nameserver {本机的内网IP地址}
search openstacklocal
vim /etc/systemd/resolved.conf

DNS={本机的内网IP地址}
DNSStubListener=no
systemctl restart systemd-resolved

现在使用内网定义的域名访问就可以成功了

(14)

Related Post