# Issues setting up BIND

## Techbart

Hey all.  I'm attempting to setup my own domain hosting along with name server, and am having troubles from the beginning.  I've been following this guide "http://gentoo-en.vfose.ru/wiki/HOWTO_Setup_a_DNS_Server_with_BIND", figuring it would be the closest match to my setup, but no matter what I try I seem to be unable to get any further than named-checkconf, returning errors with the syntax or claiming "unknown option" for any line in my zone file.  I have tried to keep the zone description as simple as possible, but it's even returning an "unknown option" error for things like "$TTL", "serial", "refresh", etc.  As far as I understand, these are all commonly accepted parameters to be used in a zone configuration, most even arguing that "$TTL" is a must have at the beginning of any zone conf file.  Sooo er, yeah, any help would be awesome.  I'll paste my zone conf below in case there's something glaringly obvious I've overlooked.  Cheers.

 $TTL 86400

TEST firesky.embers.se 

@  IN 	SOA 	ns1.firesky-embers.se.	admin.firesky-embers.se. (

2014070701 ; serial

12h ; refresh

1h ; retry

2w ; expire

1h ; minimum	 	

)

firesky-embers.	IN NS ns1.firesky-embers.se.

IN A 192.168.1.138

mail.firesky.embers. IN MX 10 mail.firesky-embers.se.

firesky-embers. IN MX 10 mail.firesky-embers.se

www IN A 192.168.1.138

mail IN A 192.168.1.138

ns1 IN A 192.168.1.138

----------

## druggo

comment the 2nd line:

```
;TEST firesky.embers.se 
```

----------

## Techbart

I actually tried doing that.  In fact, I tried commenting out any line that was returned as being an "unknown option" error, and have still found that any line that isn't commented out to be returning "unknown option" errors.  

I've recently tried to run with the default BIND named.conf layout that came with BIND 9.4, altering only the zone section of named.conf to point to the zone I'm using for master domain, and everything checks out fine now.  I'm pretty sure the errors named-checkconf were throwing up were caused by the instructions I followed from "http://gentoo-en.vfose.ru/wiki/HOWTO_Setup_a_DNS_Server_with_BIND", where it asks to use a heavily stripped down named.conf compared to the default supplied by BIND 9.4, as well as create directories and symlinks to /usr/var/ for storing zone files and reverse DNS outside of the default BIND 9.4 directory map.  

It has been very confusing overall trying to follow various guides for configuring BIND when there are so many different styles and preferences for setting it up, often depending on the architecture of the systrm it's installed on, and not least of all because guides are often using syntax from older versions of BIND with newer versions...I guess for something like BIND, there's no such thing as "one size fits all" when following guides, and instead the only thing that can be done is to study the official documentation from start to finish.

----------

## freke

This is how my setup seems to work 

```
$ORIGIN .

$TTL 604800     ; 1 week

vlh.dk                  IN SOA  ns.vlh.dk. root.vlh.dk. (

                                2014000293 ; serial

                                28800      ; refresh (8 hours)

                                14400      ; retry (4 hours)

                                604800     ; expire (1 week)

                                86400      ; minimum (1 day)

                                )

                        NS      ns.vlh.dk.

                        MX      5 mail.vlh.dk.

$ORIGIN vlh.dk.

mysql                   CNAME   ns

ns                      A       10.0.0.253

                        AAAA    2001:470:28:4a6::4

ntp1                    CNAME   ns

ntp3                    A       10.0.0.252

                        AAAA    2001:470:28:4a6::6

rsync                   CNAME   ns

www                     CNAME   ns

```

----------

## desultory

 *Techbart wrote:*   

> I guess for something like BIND, there's no such thing as "one size fits all" when following guides, and instead the only thing that can be done is to study the official documentation from start to finish.

 Before you decide to join a BIND monastery, you might try posting your /etc/bind/named.conf (along with any files included therein with the exception of /etc/bind/rndc.key), and the commands you have run with the output they produce, and your zone file, if it has changed from what you have already posted.

----------

