Monday, 4 November 2019

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


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'



Answer



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


No comments:

Post a Comment

How can I VLOOKUP in multiple Excel documents?

I am trying to VLOOKUP reference data with around 400 seperate Excel files. Is it possible to do this in a quick way rather than doing it m...