# [Solved]Getting bind slave up

## Letharion

Hello folks  :Smile: 

I've followed the excellent "Gentoo BIND Guide", and gotten my primary DNS up and running.

I'm having some issues getting the slave working with me however, and I would appreciate any input you give me  :Smile: 

Here's my masters named.conf, logging removed, for brevity:

```
options {

        directory "/var/bind";

        listen-on-v6 { none; };

        listen-on port 53 { 127.0.0.1; MY_IP; };

        pid-file "/var/run/named/named.pid";

};

view "external" {

        match-clients { any; };

        recursion no;

        zone "." IN {

                type hint;

                file "named.ca";

        };

        zone "127.in-addr.arpa" IN {

                type master;

                file "pri/127.zone";

                allow-update { none; };

                notify no;

        };

        zone "letharion.se" {

                type master;

                file "pri/letharion.se.external";

                allow-query { any; };

                allow-transfer { SLAVE_IP; };

        };

};
```

And my zone file:

```
$TTL 2d

@  IN SOA   ns1.letharion.se. ADMIN.letharion.se. (

   10042601 ;serial

   3h ;refresh

   1h ;retry

   1w ;expiry

   1d )  ;minimum

letharion.se.     IN MX 0 mail.letharion.se.

letharion.se.     IN TXT   "v=spf1 ip4:MY_IP/32 mx ptr mx:mail.letharion.se ~all"

letharion.se.     IN NS ns1.letharion.se.

letharion.se.     IN NS SLAVE_IP

www.letharion.se. IN A  MY_IP

ns1.letharion.se.    IN A  MY_IP

mail.letharion.se.   IN A  MY_IP
```

My slaves named.conf:

```
options {

        directory "/var/bind";

        listen-on-v6 { none; };

        listen-on port 53 { 127.0.0.1; SLAVE_IP; };

        pid-file "/var/run/named/named.pid";

};

view "external" {

        match-clients { any; };

        recursion no;

        zone "." IN {

                type hint;

                file "named.ca";

        };

        zone "127.in-addr.arpa" IN {

                type master;

                file "pri/127.zone";

                allow-update { none; };

                notify no;

        };

        zone "letharion.se" {

                type slave;

                file "pri/letharion.se.external.bak";

                allow-query { any; };

                masters { MY_IP; };

        };

};
```

"Internetstiftelsen", handles the TLD .se, and they have a self-test one can run on ones DNS's before actually using them. Running this test, it returns a number of errors:

```
1) You only have 1 DNS

2) Glue for DNS-server ns1.letharion.se differs between child and parent zone. This is a configuration problem that should be corrected.

3) I can find no adress for SLAVE_IP.letharion.se. Incorrect hostname or adress for SLAVE_IP.letharion.se.

And finally a warning

1) The SOA-serialnumber is not the same on all servers. This is usually a misconfiguration, but could be related to slow propagation of the zone to secundary DNS-servers
```

Last edited by Letharion on Tue May 04, 2010 10:48 am; edited 1 time in total

----------

## gerdesj

The key error I think is actually in the warning and not the error.  Please could you check that the zone file on your slave is the same as the zone file on your master.

If they are different then delete the one on the slave and force a re-import (or wait for some time!)

Cheers

Jon

----------

## Letharion

Now that a few hours have passed, the warning is gone. All of the errors remain however.

Looking at the two zone files on master and slave, their serial numbers now match.

I find to my surprise however that the slave has "cleaned up" my zone file, by fixing indentation, removing "IN" from "IN NS" and such things, but I assume that's normal.

Here it is:

```
$TTL 172800     ; 2 days

letharion.se            IN SOA  ns1.letharion.se. ADMIN.letharion.se. (

                                10042601   ; serial

                                10800      ; refresh (3 hours)

                                3600       ; retry (1 hour)

                                604800     ; expire (1 week)

                                86400      ; minimum (1 day)

                                )

                        NS      ns1.letharion.se.

                        NS      SLAVE_IP.letharion.se.

                        MX      0 mail.letharion.se.

                        TXT     "v=spf1 ip4:MY_IP/32 mx ptr mx:mail.letharion.se ~all"

$ORIGIN letharion.se.

mail                    A       MY_IP

ns1                     A       MY_IP

www                     A       MY_IP
```

----------

## Letharion

Ah, I can't have an IP-adress as data for an NS record.

The data field must have a name, and that name should instead have an ip.

----------

