【问题标题】:bind9 does not answer to external requests on IONOS VPSbind9 不响应 IONOS VPS 上的外部请求
【发布时间】:2021-03-10 09:15:58
【问题描述】:

我有一个 bind9 服务器正在运行以请求 i.example.com。当我从名称服务器向它自己的公共 IP 发出请求时,像这样 nslookup ns1.i.example.com xxx.xxx.xxx.xxx 我得到了预期的答案:

Server:         xxx.xxx.xxx.xxx
Address:        xxx.xxx.xxx.xxx#53

Name:   ns1.i.example.com
Address: xxx.xxx.xxx.xxx

如果我从办公室计算机发出请求,我不会得到任何答复:

C:\Users\user>nslookup ns1.i.example.com xxx.xxx.xxx.xxx
DNS request timed out.
    timeout was 2 seconds.
Server:  UnKnown
Address:  xxx.xxx.xxx.xxx

DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
DNS request timed out.
    timeout was 2 seconds.
*** Request to UnKnown timed-out

Nmap 显示可以从办公室计算机访问端口 53:

PORT   STATE         SERVICE
53/udp open|filtered domain

在我的 bind9 选项中,我也在监听我的公共 IP 地址:

dnssec-validation auto;

listen-on-v6 { any; };
listen-on port 53 { 127.0.0.1; xxx.xxx.xxx.xxx; };
allow-query {
        any;
};
allow-recursion { any; };

另外,我没有设置任何 iptables 规则。

任何想法如何解决这个问题?

【问题讨论】:

  • 通常防火墙会阻止DNS请求,你允许了吗?
  • @SreeramNair 我从我的 VPS 提供商处安装了 debian。我只熟悉 iptables 作为 linux 防火墙。有什么建议我应该寻找哪些防火墙软件?我没有自己安装任何东西。
  • 这个问题在这里与编程完全无关。

标签: networking dns bind bind9


【解决方案1】:

除了我的 iptables 规则之外,我的 VPS 提供商 IONOS 还拥有额外的防火墙。在管理面板中打开 53 端口确实解决了问题。

【讨论】:

  • 太棒了,你找到了。我在想应该有一个额外的防火墙阻止它
  • @SreeramNair 是的,我觉得自己有点像个白痴。但是我从来没有与其他 VPS 提供商有任何额外的防火墙,所以我没有考虑它......
猜你喜欢
  • 2021-05-06
  • 2017-02-13
  • 2013-07-23
  • 1970-01-01
  • 2021-05-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多