Dynamic DNS /var/named permissions issue

hilario

Well-Known Member
Jan 5, 2008
50
0
56
Sao Paulo, Brazil
I need to set a Dynamic DNS in a WHM/cPanel server.
I am currently using nsupdate on client desktops.

/var/named owner is root and its group is named.
Permissions are 755

When I run the nsupdate script I got the "update failed: SERVFAIL" error message.
I than changed /var/named permissions to 775 and the script worked ok with no errors and the dynamic zone was correctly updated.

However, a few hours later I notice that /var/named permissions are back to 755 and named can not update the dynamic zones anymore.

I suppose that somehow, WHM has changed its permission back to its default.

Is there a way to configure named so it can write to this particular zone and without breaking its security?
Is there a way to move this particular zone file to a new directory where named could have write access?
 

hilario

Well-Known Member
Jan 5, 2008
50
0
56
Sao Paulo, Brazil
I am still unable to set the Dynamic DNS to work.

I would appreciate if anyone could point me where to search for answers to this issue.
 

hilario

Well-Known Member
Jan 5, 2008
50
0
56
Sao Paulo, Brazil
Solution:

Create a new directory
mkdir /var/named/dynamic
chown named:named /var/named/dynamic
chmod 640 /var/named/dynamic

and move your dynamic zone from /var/named to /var/named/dynamic and do not forget to edit named.conf to point this zone to its newer location.
 

hilario

Well-Known Member
Jan 5, 2008
50
0
56
Sao Paulo, Brazil
If anyone is wondering about the possibility of transforming any server into a Dynamic DNS server, read this:

Yes, BIND (named) is already a dynamic DNS server.
You do not need to install anything in your cPanel server. So, no risk of breaking cPanel
All you have to do is insert half a dozen lines in named.conf

Works like a charm

Say good buy to commercial Dynamic DNS servers like no-ip or dyndns.