我试图在没有8.8.8.8或8.8.4.4的情况下创建自己的名称服务器。我在一开始就把它设置好了,但我不知道我哪里出了问题,我得到的只是
连接超时;无法到达任何服务器
这是我的区域文件
zone "my-new-place.com" IN {
type master;
file "/etc/bind/my-new-place.com";
};这是我的/etc/resolv.conf文件,我使用888作为我的eth0 ipv4
search my-new-place.com
nameserver 192.168.1.888这是我的名字服务器文件
$TTL 864
@ IN SOA k.my-new-place.com root.my-email.com (
2
3600
900
604800
864
)
@ IN NS k.my-new-place.com
k.my-new-place.com IN A 89.31.143.1这是我的控制文件/etc/bind/named.conf.options
ACL bindMe {
192.168.1.0/24;
};
options {
directory "/var/cache/bind";
listen-on port 53 { 192.168.1.888; 127.0.0.1; };
allow-query { localhost; bindMe; };
forwarders { 192.168.1.1; };
recursion yes;
};发布于 2018-09-16 02:04:06
我不太清楚发生了什么事。我认为bind没有运行,因为您的配置出现了错误,因此无法访问。如果这没有帮助,请编辑您的帖子,以包括您正在运行的命令和其他输出。
当您与bind交互时,您正在使用systemctl吗?例如:
systemctl restart bind9当你这样做的时候,命令会说出错误吗?通常情况下,当出现问题时,它会引导您查看journalctl。系统告诉你什么是错误的?
您可以检查bind是否正在使用systemctl status bind9或ps aux | grep named,或者可能使用rndc status。
也许您的/etc/bind/named.conf.local是正确的,但是您没有发布一个,所以请确保您在该文件中有区域条目。每个域需要一个,每个子网需要一个:
zone "example.tld" {
type master;
file "/etc/bind/zones/example.tld.zone";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/zones/192.168.1.zone";
};这里是一个工作的/etc/bind/named.conf.options,但是,我已经调整了IP以读取.200,从.888是not有效IP开始。
options {
directory "/var/cache/bind";
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0's placeholder.
// forwarders {
// 0.0.0.0;
// };
//========================================================================
// If BIND logs error messages about the root key being expired,
// you will need to update your keys. See https://www.isc.org/bind-keys
//========================================================================
recursion yes;
allow-recursion {localnets; 192.168.1.0/16;};
forwarders {
192.168.1.1;
};
dnssec-enable yes;
dnssec-validation auto;
dnssec-lookaside auto;
auth-nxdomain no; # conform to RFC1035
listen-on { 192.168.1.200; 127.0.0.1; };
// listen-on-ipv6 { any; };
};在您重新检查了设置之后,重新启动bind并找到日志和输出来确定问题。请张贴准确的命令和日志,你已经找到,因为可能有更多的错误,这将是很难帮助任何人没有所有的细节。
另外一条建议是一次只改变一件事。更改您的IP,验证您仍然具有连接性。然后,调整绑定等,采取迭代的方法,并确保每次进行更改时,都没有破坏其他所有内容。
https://askubuntu.com/questions/1075644
复制相似问题