大网数据广告活动
服务器运维问答

Unbound, exceptions to local-zone rules for specific subdomains and main domain

· 52CE 我爱测

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 1…

问题原文

原帖链接 · 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"

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2015-01-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。