bug? incorrect syntax of zone.db file

eview

New member
Joined
Jul 17, 2005
Messages
1
i am not sure, is it a bug or... i contacted other administrator who also maintain the server, and they said that no-one had manualy edited giedrius.de.db file, but i found it with wrong syntax:

cat /var/named/giedrius.de.db
$TTL 14400
@ IN SOA ns1.eu.e-vaizdas.net root (
2005071701
7200
3600
1209600
86400 )

giedrius.de. 14400 IN NS ns1.eu.e-vaizdas.net
giedrius.de. 14400 IN NS ns2.eu.e-vaizdas.net

ftp 14400 IN A 83.149.90.224
giedrius.de. 14400 IN A 83.149.90.224
localhost 14400 IN A 127.0.0.1
mail 14400 IN A 83.149.90.224
pop 14400 IN A 83.149.90.224
www 14400 IN A 83.149.90.224

giedrius.de. 14400 IN MX 10 mail



giedrius.de. IN TXT "v=spf1 a mx ip4:83.149.90.224 ?all"

------------------------------------
first, there is no "$ORIGIN" directive at the beggining of the file. Second, there are missing dot at the end of "IN NS ns1.eu.e-vaizdas.net" !! (the same dot problem in SOA record)

does anyone had similar problems?
 
Eview and Jon,

That's actually NOT a problem. And it is the standard DA way.

You only need an $ORIGIN directive at the beginning of a zone file if the ORIGIN isn't the default, which is defined as the domain name under which the zone file is being called in the conf file.

Since the DA /etc/named.conf file calls the file with the same name as the domain the zone is for, it doesn't need an $ORIGIN directive.

If you feel uncomfortable without an $ORIGIN directive (after all, while not required, it serves as documentation of which domain the zone file is for), you copy the file:

/usr/local/directadmin/data/templates/named.db

to

/usr/local/directadmin/data/templates/custom/named.db

and then edit the one in the custom directory, adding this line at the top:

$ORIGIN [DOMAIN]

As far as those three lines without the "." character at the end; you fix that yourself using the web-based DA interface to DNS.

Either that or edit the individual zone files at /var/named/*.db

Jeff
 
Back
Top