48小时后不应用DNSconfiguration

我在域控制面板中将名称服务器设置为ns1.mydomain.comns2.mydomain.com 。 我用以下configuration我的Linux服务器:

 /etc/bind$ cat named.conf.local zone "mydomain.com" { type master; file "/etc/bind/mydomain.com.db"; } 

这是我的域configuration(mydomain.com.db文件):

 /etc/bind$ cat mydomain.com.db ; ; BIND data file for mydomain.com ; $TTL 3h @ IN SOA ns1.mydomain.com. email.mydomain.com. ( 1 ; Serial 3h ; Refresh after 3 hours 1h ; Retry after 1 hour 1w ; Expire after 1 week 1h ) ; Negative caching TTL of 1 day ; @ IN NS ns1.mydomain.com. @ IN NS ns2.mydomain.com. mydomain.com. IN MX 10 mail.mydomain.com. mydomain.com. IN A my_valid_server_ip_here ns1 IN A my_valid_server_ip_here ns2 IN A my_valid_server_ip_here www IN CNAME mydomain.com. mail IN A my_valid_server_ip_here ftp IN CNAME mydomain.com. ; Subdomains beta IN A my_valid_server_ip_here api IN A my_valid_server_ip_here 

这是dig命令的结果

 dig @my_valid_server_ip_here mydomain.com ; <<>> DiG 9.10.3-P4-Ubuntu <<>> @1my_valid_server_ip_here mydomain.com ; (1 server found) ;; global options: +cmd ;; connection timed out; no servers could be reached 

我应该等待更多,或者我的configuration是错误的?

—- 更新

这是我ufw的结果:

 To Action From -- ------ ---- 22 ALLOW Anywhere 80/tcp ALLOW Anywhere 5432/tcp ALLOW Anywhere 53 ALLOW OUT Anywhere 

——- 更新 :更新规则,所以新的ufw状态是

 Status: active Logging: on (low) Default: reject (incoming), allow (outgoing) New profiles: skip To Action From -- ------ ---- 22 ALLOW IN Anywhere 80/tcp ALLOW IN Anywhere 5432/tcp ALLOW IN Anywhere 53 ALLOW IN Anywhere 

问题是存在的,也挖不了,抛出相同的错误!

超级疯狂的错误! 没有正文监听端口53,绑定服务不运行。 所以运行这个命令后:

 sudo named -g -p 53 

我得到了这个结果:

 11-Oct-2016 11:09:25.010 BIND 9 is maintained by Internet Systems Consortium, 11-Oct-2016 11:09:25.010 Inc. (ISC), a non-profit 501(c)(3) public-benefit 11-Oct-2016 11:09:25.010 corporation. Support and training for BIND 9 are 11-Oct-2016 11:09:25.010 available at https://www.isc.org/support 11-Oct-2016 11:09:25.010 ---------------------------------------------------- 11-Oct-2016 11:09:25.010 adjusted limit on open files from 65536 to 1048576 11-Oct-2016 11:09:25.010 found 1 CPU, using 1 worker thread 11-Oct-2016 11:09:25.010 using 1 UDP listener per interface 11-Oct-2016 11:09:25.010 using up to 4096 sockets 11-Oct-2016 11:09:25.012 loading configuration from '/etc/bind/named.conf' 11-Oct-2016 11:09:25.013 /etc/bind/named.conf:11: missing ';' before 'include' 11-Oct-2016 11:09:25.013 loading configuration: failure 11-Oct-2016 11:09:25.013 exiting (due to fatal error) 

“超级疯狂错误”发生了! 我忘了把区分configuration文件中的分号,所以绑定服务甚至不运行。

 zone "mydomain.com" { type master; file "/etc/bind/mydomain.com.db"; }; 

在正确configuration并重新启动bind9服务之后,这是openports的netstat输出:

 tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 551/sshd tcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 3489/named tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 619/nginx -g daemon tcp 0 0 172.17.0.1:53 0.0.0.0:* LISTEN 3489/named tcp 0 0 130.185.74.136:53 0.0.0.0:* LISTEN 3489/named tcp 0 0 127.0.0.1:53 0.0.0.0:* LISTEN 3489/named tcp6 0 0 :::22 :::* LISTEN 551/sshd tcp6 0 0 ::1:953 :::* LISTEN 3489/named tcp6 0 0 :::80 :::* LISTEN 619/nginx -g daemon tcp6 0 0 :::53 :::* LISTEN 3489/named udp 0 0 172.17.0.1:53 0.0.0.0:* 3489/named udp 0 0 130.185.74.136:53 0.0.0.0:* 3489/named udp 0 0 127.0.0.1:53 0.0.0.0:* 3489/named udp6 0 0 :::53 :::* 3489/named 

我不知道为什么我使用service start时没有得到任何错误!