I'm trying to make my own nameserver without or I had it set up in the beginning but I don't know where I went wrong, all I get is

;; connection timed out; no servers could be reached

This is my zone file

zone "my-new-place.com" IN {
type master;
file "/etc/bind/my-new-place.com";

This is my /etc/resolv.conf file, I'm using 888 as my eth0 ipv4

search my-new-place.com

This is my my nameserver file

$TTL 864
@ IN SOA k.my-new-place.com root.my-email.com (
@ IN NS k.my-new-place.com

k.my-new-place.com IN A

This is my control file /etc/bind/named.conf.options

ACL bindMe {;

options {
directory "/var/cache/bind";
listen-on port 53 {;; };
allow-query { localhost; bindMe; };
forwarders {; };
recursion yes;

It's not entirely clear to me what is happening. I imagine that bind is not running, due to errors in your configurations, so it is unreachable. If this isn't helpful, please edit your post to include the command you're running, and additional output.

When you interact with bind, are you using systemctl? For example:

systemctl restart bind9

When you do this, does the command spit out any errors? Normally when something is wrong, it will direct you to look at journalctl. What is the system telling you is wrong?

You can check if bind is running using systemctl status bind9, or ps aux | grep named, and possibly rndc status.

Maybe you have your /etc/bind/named.conf.local correct, but you did not post one, so be sure that you have the zone entries in that file. You will need one per domain, and one per subnet served:

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";

Here is a working /etc/bind/named.conf.options, however, I've adjusted the IP to read .200, since .888 is not a valid 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 {
            // };

            // 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;;};

            forwarders {

            dnssec-enable yes;
            dnssec-validation auto;
            dnssec-lookaside auto;

            auth-nxdomain no;    # conform to RFC1035
            listen-on {;; };
            // listen-on-ipv6 { any; };

After you've double-checked the settings, restart bind and find the logs and output to determine the problem. Please post the exact commands, and logs you've found, as there may be even more wrong and it will be hard for anybody to help without all of the details.

An additional tip would be to change one thing at a time. Change your IP, verify you still have connectivity. Then, adjust bind, etc. Take an iterative approach, and ensure that each time you make a change, you haven't broken everything else.

  • +1 for .888 is not a valid IP. – Elder Geek Oct 12 '18 at 18:11
  • .888 was just used an example without using my real IPV4 mr. – user610658 Oct 25 '18 at 7:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy