【问题标题】:Creating a DNS forward in Google Cloud Platform with Bind9使用 Bind9 在 Google Cloud Platform 中创建 DNS 转发
【发布时间】:2020-01-15 10:19:13
【问题描述】:

我有一个使用 Bind9 的 DNS 服务器。我正在尝试创建从 Google 内部 DNS 到我的节点的 DNS 转发,这些节点也在云中。

简要概述:

我有 3 个节点,它们都是 GCP 中的计算引擎。 1 个节点用作具有此配置的 DNS 服务器:

zone "gcloud" {
  type forward;
  forwarders {
    # IP according to their site https://cloud.google.com/dns/docs/overview#dns-forwarding
    169.254.169.254;
  };
};

我重新启动 Bind9,一切看起来都很好。然后在其他两个节点上,我将名称服务器 IP 更改为我的 DNS 服务器。当我尝试使用 dig 时,我没有得到任何记录。 Ping 主机名以前有效,但现在无效。

关于我做错了什么的任何线索?如果我需要提供更多信息,请告诉我。

【问题讨论】:

    标签: google-cloud-platform dns google-compute-engine bind9


    【解决方案1】:

    我解决了我的问题。

    我认为区域的名称可以是任何名称。然而,事实并非如此。

    我要做的就是将区域名称更改为我拥有的域名。域如下所示:[INSTANCE_NAME].c.[PROJECT_ID].internal。所以我的 conf 必须是这样的:

    zone "c.your-project-id-here.internal." {
        type forward;
        forward only;
        forwarders {
           169.254.169.254;
        };
    };
    

    然后我不得不为反向查找做另一个 conf。内部 IP 可能如下所示:10.20.0.55,这意味着您必须对 20.10 进行反向查找。

    zone "20.10.in-addr.arpa." {
        type forward;
        forward only;
        forwarders {
            169.254.169.254;
        };
    };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-08-23
      • 2017-05-23
      • 1970-01-01
      • 2019-08-16
      • 1970-01-01
      • 1970-01-01
      • 2021-09-12
      相关资源
      最近更新 更多