Help - Search - Members - Calendar
Full Version: cpanel DNS quirk
The Planet Forums > Control Panels > cPanel/WHM
netra
Hi,

I've encounterd a problem with cpanel DNS and solved it in a non treditional way.
I'd like your comments on the way.

The config:
2 cpanel server, primary and secondary DNS.

The problem:
when pressing " Synchronize DNS Records With Primary Nameserver " on the secondary, I'm getting Scp failed!
However /scripts/dnstransfer when run from commad line works.
scp from command line also works.
i.e. trust relationship configured currectly.

The solution:
change the file /scripts/dnstransfer
and replace the line:
system("scp "Protocol 1,2" $dnsmaster:/etc/named.conf /etc/named.conf.dnstranfer")

to

system("scp "Protocol 1,2" $dnsmaster:/etc/named.conf /etc/named.conf.dnstranfer 2>/dev/null")


Only problem with that is that each cpanel update I'll have to eedit the file (wrote to cpanel about that and hope they'll change it soon)


Your comments?


Cheers.
cpanelrich
chmod +i the file so it cant be overwritten.
netra
yeah, you mean chattr +i.
Thanks, good edvice icon_smile.gif
cpanelrich
yes im sorry!

brain slippage, chattr +i

lol

*holds head in shame*
aussie
QUOTE
Originally posted by netra
Hi,

I've encounterd a problem with cpanel DNS and solved it in a non treditional way.  
I'd like your comments on the way.

The config:
2 cpanel server, primary and secondary DNS.
 
The problem:
when pressing " Synchronize DNS Records With Primary Nameserver " on the secondary, I'm getting Scp failed!
However /scripts/dnstransfer when run from commad line works.
scp from command line also works.
i.e. trust relationship configured currectly.

The solution:
change the file /scripts/dnstransfer
and replace the line:
system("scp "Protocol 1,2" $dnsmaster:/etc/named.conf /etc/named.conf.dnstranfer")
 
to

system("scp "Protocol 1,2" $dnsmaster:/etc/named.conf /etc/named.conf.dnstranfer 2>/dev/null")


Only problem with that is that each cpanel update I'll have to eedit the file (wrote to cpanel about that and hope they'll change it soon)


Your comments?


Cheers.


You should make this clear for everyone because the only time you need to "Synchronize DNS Records With Primary Nameserver " on the secondary" is if your using the Master/Slave relationship, running DNS on both a Master and Slave setup. Ordinarily however, people running one box, or two boxes using NS1 - NS4 should not be running this command.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.