需求:公司内部需要在访问某个域名时直接跳转到内部服务器上,其他域名可以正常访问。 1、安装 dnsmasq yum install dnsmasq 2、添加域名记录: vim /etc/hosts 直接添加需要在内网访问的域名和IP 3、配置默认的公网dns:(否则无法访问公网) vim /etc/resolv.conf 4、启动dnsmasq /bin/systemctl restart dnsmasq.service 来源:https://my.oschina.net/thanksgivingday/blog/3106593 标签 dnsmasq V-IM