如何使用dnsmasq将子域指向其他本地服务器?

时间:2020-11-06 09:57:46

标签: dns webserver dnsmasq

我需要帮助将subdomain.example.com从本地服务器A指向本地服务器B。 我做了以下事情:

服务器A上的

/etc/dnsmasq.conf

local=/subdomain.example.com/
address=/subdomain.example.com/localipB
addn-hosts=/etc/dnsmasq_static_hosts.conf
expand-hosts
domain=example.com
服务器A上的

/etc/dnsmasq_static_hosts.conf

localipB subdomain subdomain.example.com
服务器A上的

/ etc / hosts

localipB subdomain.example.com

/ etc / hosts在服务器B上

127.0.0.1       localhost
127.0.0.1       subdomain.example.com
服务器B上的

/ etc / hostname

subdomain

非常感谢。

0 个答案:

没有答案