问题原文
原帖链接 · Johan · CC BY-SA 3.0
I have a simple rule to point my domain.tld to a local address 192.168.0.205. It takes everything; all subdomains *.domain.tld as well as the main domain itself.
local-zone: "domain.tld." redirect
local-data: "domain.tld. IN A 192.168.0.205"
I have my load balancer at 192.168.0.205 so for making requests working internally I need to do this. However, my mail server is located outside this network, so I need to make three exceptions to this; smtp.domain.tld, imap.domain.tld and domain.tld itself. I'd prefer if I just could make those slip through to the ISP's dns, but if that is not possible I can live with having to set their global ip's in my config.
How can I do this? I've tried using transparent instead of redirect but I cannot make it work like I want. I think one of the main problems is to handle the main domain without subdomain prefix.
社区高分解答
原帖链接 · diyism · CC BY-SA 3.0
Use this style, multiple level wildcard subdomains:
local-zone: "sub.domain.tld." redirect
local-data: "sub.domain.tld. IN A 222.222.222.222"
local-zone: "domain.tld." redirect
local-data: "domain.tld. IN A 111.111.111.111"
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
