Named.conf untidy

David C

Verified User
Joined
Mar 10, 2006
Messages
74
I'm having some issues with my dns lately.

Every nowadays, some of my clients zone files would be commented on my named.conf. No idea why.

It also seems like my named.conf is getting untidy.

Here's a snipplet.

Code:
zone "x" {type master;  file "/var/named/x"; notify yes; also-notify {x;} ;};
zone "x" {type master;  file "/var/named/x.com.db"; notify yes; also-notify {x;} ;};
zone "x" {type master; file "/var/named/x.com.db"; notify yes; also-notify {x;} ;};

#here's where it starts to get untidy, notice how it scrolls. No idea why.

#zone "x.org" { type master; file "/var/named/x.org.db"; };
zone "x.org" { type master; file "/var/named/x.org.db"; notify yes; also-notify {x;}; };#zone "x" { type master; file "/var/named/x.db"; };
zone "x" { type master; file "/var/named/x.com.db"; notify yes; also-notify {x;}; };#zone "x.com" { type master; file "/var/named/x.com.db"; };
zone "x.com" { type master; file "/var/named/x.com.db"; notify yes; also-notify {x;}; };#zone "s.org" { type master; file "/var/named/s.org.db"; };
zone "s.org" { type master; file "/var/named/s.org.db"; notify yes; also-notify {x;}; };#zone "s.sg" { type master; file "/var/named/s.sg.db"; };
zone "s.sg" { type master; file "/var/named/s.sg.db"; notify yes; also-notify {x;}; };#zone "s.com.sg" { type master; file "/var/named/s.com.sg.db"; };

All new zone files created will automatically be created in that format. one line with comments. No idea why.

Is there anyway to rebuild my named.conf?
 
Hello,

That format doesn't look like our default.

Our template lives at:
/usr/local/directadmin/data/templates/zone.conf

it's contents should look something like
Code:
zone "|DOMAIN|" { type master; file "|PATH|/|DOMAIN|.db"; };

If yours is like that, also check for:
/usr/local/directadmin/data/templates/custom/zone.conf

which would be created by the admin to override our template so as to use your own. Check it's contents to see if it's generating the format you're seeing in your named.conf.

John
 
The custom zone.conf looks modified.

Oh yeah, it looks like one of my admins changed it to do up the dns clustering.

The funny thing is that it didn't break a line.

Code:
#zone "|DOMAIN|" { type master; file "|PATH|/|DOMAIN|.db"; };
zone "|DOMAIN|" { type master; file "|PATH|/|DOMAIN|.db"; notify yes; also-notify {my2nddnsip;}; };

How do I force a break and rewrite all the dns entries?
 
Remove:
Code:
#zone "|DOMAIN|" { type master; file "|PATH|/|DOMAIN|.db"; };

And run:
Code:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
/usr/local/directadmin/dataskq d
 
It looks like that just rewrites the named.db and not the named.conf.

My named.conf is still the same (I waited at least 5 minutes before checking).
 
Yeah, the rewrite only applies to domain.com.db files.
The named.conf has to be done manually, or via perl regex.

John
 
Back
Top