问题原文
原帖链接 · Tonydowner · CC BY-SA 4.0
My VM has 2 interfaces, eth1 & eth2 and I need to resolve 2 domain names *.abc.exanple and *.xzy.example
For *.abc.example I want to use DNS server 192.0.2.1 via eth1
For *.xyz.example I want to use DNS server 192.0.2.2 via eth2
Much appreciate if you can advise me a solution as simple as possible since I'm quite new to Linux :-) Host file is is not an option, since I have to implement
已采纳解答
原帖链接 · Tommiie · CC BY-SA 4.0
If you run your own DNS server locally on that server, you can create conditional forwarders for these two domains. Using static routing you can force traffic for 192.0.2.1 to leave eth1 and traffic destined to 192.0.2.2 to leave eth2.
For BIND9, a sample (snippet) configuration would be:
zone "abc.example" {
type forward;
forwarders { 192.0.2.1; };
};
zone "xyz.example" {
type forward;
forwarders { 192.0.2.2; };
};
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
