Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm pretty new to BIND so I was hoping maybe someone can help me understand why I can't resolve. What is wrong?

named.conf

options {
        listen-on port 53 { localhost; 10.30.0.10; };
        listen-on-v6 port 53 { ::1; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
        allow-query     { any; };
        recursion no;
        version "0";


        channel query.log {
                file "/var/log/query.log";
                severity debug 3;
                print-severity yes;
                print-time yes;
        };
        category queries { query.log; };
};
acl "Tele-Subnet" { 10.100.0.0/16; };
view "Tele" {
        match-clients { "Tele-Subnet"; };

        zone "example.net" IN {
                type master;
                file "/var/named/example.net.db";
                allow-update { none; };
                allow-query { any; };
                notify yes;
        };

};

example.net.db

ORIGIN example.net.
$TTL 86400

example.net.       IN      SOA     10.30.0.10.      admin.example.net. (
                        2012081901      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )
        IN      A       10.30.0.10
                NS      10.30.0.10.
                NS      10.30.0.10.






backup    IN       A      10.10.11.230  ; Engine

So when I query the server, I can only see this in the logs:

19-Aug-2012 14:45:09.566 info: client 10.100.0.13#5682: view Telenor: query: backup.example.net IN A + (10.30.0.10)

share|improve this question
1  
I don't really see any problem on your config, just one question...do you have any other view defined? I'm just saying because in the logs can be read "view Telenor", not present on your config. –  tripledes Aug 19 '12 at 15:21
2  
Actually there is an issue with the NS values. RFC 1035 says that NS values must be a 'domain name' (hostname), not an IP address. You should create an A record for ns.example.com (or something of the sort) and set the NS to it (plus fix the SOA as well). Whether this would cause your specific problem, I don't know. –  Patrick Aug 19 '12 at 17:23
    
Didn't notice that...now you say it, the configuration is mixed, he's using IPs with final dot as in hostnames. –  tripledes Aug 19 '12 at 20:44
    
Alright. Still not working. Tripledes - it's the same view just not edit. i changed the correct values so it won't be on the web but since it's a vpn i kinda feel dumb right now. Patrick - Changed everythings to what you said but still can't get it to work. is there a more verbose debug level i can you to see more then queries? like maybe the whole flow on the request? –  Nir Shezifi Aug 20 '12 at 11:29

2 Answers 2

You missed several dots, are you sure it wasn't a typo ?

ORIGIN example.net.
$TTL 86400

example.net.       IN      SOA     10.30.0.10.      admin.example.net. (
                        2012081901      ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
                        )
        IN      A       10.30.0.10.
                NS      10.30.0.10.

backup    IN       A      10.10.11.230.  ; Engine
share|improve this answer

There are numerous issues with your named configs. The ones I can pick out:

  • NS record is missing 'IN' keyword at the start
  • IP addresses should not end with a dot (as already pointed out)
  • your should have a proper FQDN (fully qualified domain name) for your nameserver. In your configs, you currently have set 10.30.0.10 as your nameeserver's domain name. So bind will translate 10.30.0.10. to 10.30.0.10.example.net. Your nameserver's FQDN should be something like ns1.example.net..

Here are a number of dns troubleshooting tips you can try (if you haven't already done so):

  • run named-checkconf and named-checkzone utilities (they should be part of the bind package you've installed). Run the commands like so:

    named-checkconf -jpz

    named-checkzone example.net /var/named/example.net.db

What are the warning/error messages displayed after run those commands?

  • run the dig command (you may have to install dnsutils for debian based OS, or bind-utils for redhat based OS). Run the command something like this for testing:

    dig backup.example.net @localhost
    
  • DNS service listens on udp port 53. So make sure your firewall traffic is configured to allow dns traffic.

  • check out these following websites for good snippets of dns config examples:

http://www.server-world.info/en/note?os=CentOS_6&p=dns&f=1

https://help.ubuntu.com/community/BIND9ServerHowto

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.