使用专用DNS服务器指向前向区域下的开发资源,如何转发所有本地未parsing的请求?

当我在家庭办公室工作时,我想允许我正在开发的智能手机应用程序通过域名与本地开发服务器进行通信。

我在Synology NAS上安装了一个DNS服务器,通常对于非开发资源来说,它运行良好。 发展是有问题的。 我创build了一个主区域并在其下面进行logging。 问题是我们的通配符SSL证书只适用于我们的公共域名(称之为foo.com)。 这意味着我不能说HTTPS在本地,我宁愿我的开发环境尽可能接近生产,所以我想要HTTPS。

我想要的是本地DNS服务器parsing我的开发服务器(mydev.foo.com)的查询,并将所有其他查询转发到上游DNS服务器。 例如:

mydev.foo.com -> 192.168.1.3 (my local VM, resolved locally) foo.com -> xxx.xxx.xxx.xxx (our public website, resolved by my ISP) bar.foo.com -> xxx.xxx.xxx.xxx (our public app server, resolved by my ISP) 

现在,如果我设置了一个foo.com主区域(一个前向区域),只有本地定义的资源被parsing。

我甚至可能问什么?

感谢用户yoonix的评论。

请记住,DNS服务器将parsing与查询中的域名相对应的最长的域名条件。

用yoonix的答案和理解的关键点,答案是一个主logging,具有以下设置:

主区域:

 Domain Type: Forward Zone Domain Name: mydev.foo.com Master DNS Server: <IP of the Synology NAS> Serial Format: Integer Limit Zone Transfer: True Limit Source IP Service: False Enable Slave Zone Notification: False Limit Zone Update: True 

资源logging:

 (Automatically Generated) ns.foo.mydev.com. Type: A TTL: 86400 Information: <IP of the Synology NAS> (Automatically Generated) foo.mydev.com. Type: NS TTL: 86400 Information: ns.foo.mydev.com foo.mydev.com. Type: A TTL: 86400 Information: <IP of the dev VM>