BIND DNS settings on Mac OS X Lion: Errors in .zone file

0

I'm using Mac OS X Lion's BIND to set up a local domain "webapp.local". I've already set up a VirtualHost in Apache and added "webapp.local" to the host file, which works.

But wanted others on my network to access it.

So I got as far as creating the file /var/named/webapp.zone

webapp.local.         IN      SOA     webapp.local. root.webapp.local.    (
        20100601
        15
        3600
        3000000
        86400 )
        IN      NS      webapp.local.
        IN      A       127.0.0.1
*.webapp.local.       IN      A       127.0.0.1

but running # named-checkconf /var/named/webapp.zone in Terminal brings up some errors

/var/named/webapp.zone:1: unknown option 'webapp.local.'
/var/named/webapp.zone:10: unexpected token near end of file

Using nano keeps adding a new line to the end of the file, which might explain the second error message, though I'm not certain.

Also, adding any comments with ; would return the error message unknown option 'comment'

Adam-E

Posted 2012-03-22T16:11:29.743

Reputation: 361

ps. I realise that this question might be more suitable on ServerFault rather than SuperUser – Adam-E – 2012-03-22T16:26:09.673

Answers

0

I think you want to check that with named-checkzone, which checks zone files. Named-checkconf is expecting named.conf (by default), which has different syntax.

http://linux.die.net/man/8/named-checkconf

http://linux.die.net/man/8/named-checkzone

Craig Treptow

Posted 2012-03-22T16:11:29.743

Reputation: 321

0

I like your joke with 127.0.0.1 for remote clients

Did you try to use search for format of Bind zone-files?

; BIND db file for webapp.local

$ORIGIN webapp.local.

$TTL 86400

@       IN      SOA     webapp.local.      root.webapp.local. (
                        2012032301  ; serial number YYMMDDNN
                        28800           ; Refresh
                        7200            ; Retry
                        864000          ; Expire
                        86400           ; Min TTL
            )

            NS      webapp.local.     
webapp.local.   IN  A   127.0.0.1

Lazy Badger

Posted 2012-03-22T16:11:29.743

Reputation: 3 557

Yeah as this is the first time I've ever touch BIND, my configuration provides a good laugh for everyone else. Thanks for the links, I was following some really badly documented guide, I'm closer to correcting the problem. – Adam-E – 2012-03-23T12:51:21.833