You are not logged in.

#1 2016-07-08 16:22:48

seanhly
Member
From: Dublin, Ireland
Registered: 2016-07-08
Posts: 3
Website

BIND Server Doesn't Work

Hi there,

I followed the installation and configuration guide for the BIND server in the wikis, but once I got things running, my computer could no longer resolve domains into public IPs.

I have one laptop, and wanted to set it up as its own DNS server.

Here are my relevant files:

/etc/resolv.conf

# Generated by resolvconf
nameserver 127.0.0.1

/etc/named.conf

// vim:set ts=4 sw=4 et:

options {
    directory "/var/named";
    pid-file "/run/named/named.pid";

    // Uncomment these to enable IPv6 connections support
    // IPv4 will still work:
    //  listen-on-v6 { any; };
    // Add this for no IPv4:
    //  listen-on { none; };

    forwarders { 8.8.8.8; 8.8.4.4; };

    allow-recursion { 127.0.0.1; };
    allow-transfer { none; };
    allow-update { none; };

    version none;
    hostname none;
    server-id none;
};

zone "localhost" IN {
    type master;
    file "localhost.zone";
};

zone "0.0.127.in-addr.arpa" IN {
    type master;
    file "127.0.0.zone";
};

zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
    type master;
    file "localhost.ip6.zone";
};

zone "255.in-addr.arpa" IN {
    type master;
    file "empty.zone";
};

zone "0.in-addr.arpa" IN {
    type master;
    file "empty.zone";
};

zone "." IN {
    type hint;
    file "root.hint";
};

//zone "example.org" IN {
//    type slave;
//    file "example.zone";
//    masters {
//        192.168.1.100;
//    };
//    allow-query { any; };
//    allow-transfer { any; };
//};

//logging {
//    channel xfer-log {
//        file "/var/log/named.log";
//            print-category yes;
//            print-severity yes;
//            severity info;
//        };
//        category xfer-in { xfer-log; };
//        category xfer-out { xfer-log; };
//        category notify { xfer-log; };
//};

After this, I restarted the named.service.

Now, with 127.0.0.1 as my nameserver, all requests seem to fail.

Even the following stalls:

dig localhost

Everything is fine when my resolv.conf file points to my router or to the google nameservers, but when it's set to my local machine, no DNS.

When I uncommented the section of named.conf used for logging, and tried again, /var/log/named.log is unchanged (it doesn't even exist, I had to make the file manually with 'touch').

According to the wikis, the line forwarders { 8.8.8.8; 8.8.4.4; }; should cover any requests for unknown domains. However, this doesn't happen, and dig doesn't even appear able to access local domains with zone files.

Does anyone have any useful information to help me out, for example, how I can view a log with errors? I have searched extensively, but support for this topic in Arch Linux is very limited.

All the best,

Seán

Offline

#2 2016-07-08 19:50:11

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 326

Re: BIND Server Doesn't Work

uncomment:

    //  listen-on { none; };

and change to

  listen-on { all; };

then try a real dig command:

dig google.com @127.0.0.1
dig archlinux.org

Last edited by t0m5k1 (2016-07-08 19:51:04)


Aurora R10 (0TYR0X) - Ryzen 7 5800X - 16GB - RX6700XT 12GB - Hyprland (occasionally XFCE) - AOC Q27G3XMN 1440P
EFI Stub Boot
PROUD XLIBRE USER
Linux User: 401820  Steam-Reddit

Offline

#3 2016-07-08 19:54:18

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 326

Re: BIND Server Doesn't Work

also enable logging in the same config file, a google search will give you a multitude of options for it
...try it!


Aurora R10 (0TYR0X) - Ryzen 7 5800X - 16GB - RX6700XT 12GB - Hyprland (occasionally XFCE) - AOC Q27G3XMN 1440P
EFI Stub Boot
PROUD XLIBRE USER
Linux User: 401820  Steam-Reddit

Offline

#4 2016-07-15 00:41:12

seanhly
Member
From: Dublin, Ireland
Registered: 2016-07-08
Posts: 3
Website

Re: BIND Server Doesn't Work

I did this a few days ago and it solved the problem smile Thanks!

Offline

#5 2016-07-15 06:58:40

t0m5k1
Member
From: overthere
Registered: 2012-02-10
Posts: 326

Re: BIND Server Doesn't Work

Glad to hear it Seanhly.
Please edit the title of the first post you made & prefix it with [SOLVED]
This way people will find a fix if they have similar issue.


Aurora R10 (0TYR0X) - Ryzen 7 5800X - 16GB - RX6700XT 12GB - Hyprland (occasionally XFCE) - AOC Q27G3XMN 1440P
EFI Stub Boot
PROUD XLIBRE USER
Linux User: 401820  Steam-Reddit

Offline

Board footer

Powered by FluxBB