首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IP到域DNS错误

问IP到域DNS错误
EN

Server Fault用户
提问于 2018-08-07 12:57:51
回答 3查看 105关注 0票数 0

我购买了域名example.eu,并从我的域名注册商设置它使用ns1.example.eu和ns2.example.eu与服务器的IP 12.34.567.890。然而,这是行不通的。根据域名注册商,他们的设置没有问题。

我已经安装了LEMP堆栈(Ubuntu16.04)。

我也尝试使用freeDNS服务,但是它也不起作用。

另外,我在服务器上设置了BIND9,没有任何结果。

这是我的named.conf

代码语言:javascript
复制
zone "example.eu" {
    type master;
    file /etc/bind/external/example.eu;
    allow-transfer {
            # IPs allowed to AXFR
            12.34.567.890;
            12.34.567.890;
    };
    allow-update {
            # IPs allowed to update the zone
            12.34.567.890;
            12.34.567.890;
    };
    allow-query {
            # IPs allowed to query the zone (everyone)
            0.0.0.0/0;
    };
    notify yes;
};

/etc/绑定/外部/示例。

代码语言:javascript
复制
; example.eu
$TTL 86400
example.eu.     IN  SOA ns1.example.eu. sales.example.eu. (
                2018080601      ; Serial number
                10800           ; Refresh
                3600            ; Retry
                604800          ; Expire
                86400)          ; Minimum TTL

            ; Nameserver definition
            IN  NS  ns1.example.eu.
            IN  NS  ns2.example.eu.

            ; Mail exchanger definition
            IN  MX  10  mail.example.eu.
            IN  MX  50  mail.example.eu.

; A records definition
example.eu.     IN  A   12.34.567.890
www.example.eu. IN  A   12.34.567.890
ns1.example.eu. IN  A   12.34.567.890
ns2.example.eu. IN  A   12.34.567.890
mail.example.eu.    IN  A   12.34.567.890
mail.example.eu.    IN  A   12.34.567.890
*   IN  A   12.34.567.890

这是我的Nginx配置文件

代码语言:javascript
复制
upstream fastcgi_backend {
     server  unix:/run/php/php7.0-fpm.sock;
 }

 server {

     listen 80;
     server_name example.eu www.example.eu;
     set $MAGE_ROOT /var/www/example;
     include /var/www/example/nginx.conf.sample;

 }
EN

回答 3

Server Fault用户

发布于 2018-08-07 13:21:57

谢谢你包括你的实际域名。

当我检查由注册员为您的域配置的名称服务器时(使用.EU域,或者通过检查根服务器):

代码语言:javascript
复制
dig   anthemionflowers.eu @x.dns.eu

我看到另外四个不受你控制的:

代码语言:javascript
复制
anthemionflowers.eu.    86400   IN  NS  ns1.anthemionflowers.eu.
anthemionflowers.eu.    86400   IN  NS  ns2.afraid.org.
anthemionflowers.eu.    86400   IN  NS  ns1.afraid.org.
anthemionflowers.eu.    86400   IN  NS  ns3.afraid.org.
anthemionflowers.eu.    86400   IN  NS  ns4.afraid.org.
anthemionflowers.eu.    86400   IN  NS  ns2.anthemionflowers.eu.

;; ADDITIONAL SECTION:
ns1.anthemionflowers.eu. 86400  IN  A   51.15.101.173
ns2.anthemionflowers.eu. 86400  IN  A   51.15.101.173

这似乎是在注册员级别上造成的配置错误。这应该只返回您的实际名称服务器。

此外,51.15.101.173没有响应DNS查询。

代码语言:javascript
复制
dig ns anthemionflowers.eu @51.15.101.173

; <<>> DiG 9.10.6 <<>> ns anthemionflowers.eu @51.15.101.173
;; global options: +cmd
;; connection timed out; no servers could be reached
票数 3
EN

Server Fault用户

发布于 2018-08-07 13:23:03

您已经创建了ns1.anthemionflowers.eu的胶水记录,但是NS和SOA记录仍然指向afraid.org。在linux中,如果您运行dig +trace anthemionflowers.eu,您将得到:

代码语言:javascript
复制
anthemionflowers.eu.    86400   IN      NS      ns2.afraid.org.
anthemionflowers.eu.    86400   IN      NS      ns2.anthemionflowers.eu.
anthemionflowers.eu.    86400   IN      NS      ns4.afraid.org.
anthemionflowers.eu.    86400   IN      NS      ns3.afraid.org.
anthemionflowers.eu.    86400   IN      NS      ns1.afraid.org.
anthemionflowers.eu.    86400   IN      NS      ns1.anthemionflowers.eu.

您应该从您的NS配置与您的登记员删除那些条目的afraid.org。

开场白:让两个NS解析同一个IP地址是非常糟糕的做法(读:非常糟糕)。这使得你的DNS非常脆弱。

此外,我强烈建议不要运行您自己的DNS在所有-托管DNS是荒谬的便宜,并与保证SLA和庞大的基础设施的背后。Azure,53号路线,坦白地说,除了自己运行之外,什么都没有。

票数 3
EN

Server Fault用户

发布于 2018-08-07 15:12:56

我已经解决了这个问题。在我的named.conf文件中出现了一个错误,我在文件上运行“named checkconf”时注意到了这个错误。

票数 0
EN
页面原文内容由Server Fault提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://serverfault.com/questions/925280

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档