LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   need help with bind9 config (https://www.linuxquestions.org/questions/linux-networking-3/need-help-with-bind9-config-545767/)

ssfrstlstnm 04-13-2007 10:02 AM

need help with bind9 config
 
I have read the docs and googled for hours, but the bind config is very confusing and everyone seems to do it a little differently. I think that bind is resolving names outside of my domain since my resolv.conf only has 127.0.0.1 and I can still access the internet. But when I run dig stephen.homeip.net (my domain), I get SERVFAIL, id: 62285 error. Here are my config files:
named.conf
Code:

options {
        directory "/var/cache/bind";
        auth-nxdomain no;    # conform to RFC1035
        listen-on-v6 { any; };
};

zone "." {
        type hint;
        file "/etc/bind/db.root";
};

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

zone "stephen.homeip.net" {
        type master;
        file "/etc/bind/stephen.homeip.net";
};

stephen.homeip.net
Code:

$TTL        604800
@        IN        SOA        stephen.homeip.net. webmaster.stephen.homeip.net. (
                              3                ; Serial
                          28800                ; Refresh
                          7200                ; Retry
                        604800                ; Expire
                        604800        ; Negative Cache TTL
                        )
;
IN                NS      ns1.stephen.homeip.net.        ;
IN                NS        ns2.stephen.homeip.net.                ;
IN                MX        10 mail.stephen.homeip.net.  ;
;
stephen.homeip.net. IN A 74.140.104.208
ns1 IN A 74.140.104.208
ns2 IN A 74.140.104.208
mail IN A 74.140.104.208
www IN A 74.140.104.208


ssfrstlstnm 04-13-2007 12:38 PM

Here is what I get when I do dig stephen.homeip.net...
Code:

; <<>> DiG 9.3.2-P1 <<>> stephen.homeip.net
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 12187
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;stephen.homeip.net.        IN          A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Apr 13 13:28:12 2007
;; MSG SIZE rcvd: 36


fur 04-13-2007 01:49 PM

You don't have your NS records setup right.

Also there is no point in having 2 NS records if they point to the same IP.


Try this.
Code:

$TTL    604800
@      IN      SOA    stephen.homeip.net. webmaster.stephen.homeip.net. (
                              3        ; Serial
                          28800        ; Refresh
                          7200        ; Retry
                        604800        ; Expire
                        604800        ; Negative Cache TTL
                        )
;
stephen.homeip.net.    IN              NS      ns1.stephen.homeip.net. ;
;IN              NS      ns1.stephen.homeip.net.        ;
;IN            NS      ns2.stephen.homeip.net.        ;
IN              MX        10 mail.stephen.homeip.net.  ;
;
stephen.homeip.net. IN A 74.140.104.208
ns1 IN A 74.140.104.208
mail IN A 74.140.104.208
www IN A 74.140.104.208


fur 04-13-2007 02:00 PM

I see where you went wrong..

What you had for the NS record would have also worked but you cant start the line with with "IN"

Code:

IN                NS      ns1.stephen.homeip.net.;
Will not work. However put a tab before the "IN"

Code:

        IN                NS      ns1.stephen.homeip.net.;

And the zone should load.

ssfrstlstnm 04-13-2007 06:41 PM

It works! Thanks fur. That config is almost as bad as sendmail. Now I just need to get my reverse zone and figure out this PTR thing.


All times are GMT -5. The time now is 08:06 AM.