I have cloudmin installed on a separate server (CentOS5) cloudmin.vport.net Private IP: 192.168.63.60 Public IP: NONE (I use VPN to access)
I have virtualmin pro installed on a separate server (CentOS5) virtualmin.vport.net ns1.vport.net Private IP: 192.168.63.61 Public IP: 216.150.141.245
and two more servers with webmin installed (CentOS5) to be used as the Slave NameServers
ns2.vport.net Private IP: 192.168.63.62 Public IP: 216.150.141.240
ns3.vport.net Private IP: 192.168.63.63 Public IP: 216.150.141.241
I follow all the instructions for setting up DNS Slaves and all the troubleshooting but only the zones would transfer but none of the zone records would transfer to the slaves ie the Slaves had empty zone information.
Finally I found the problem but I can’t find out where to fix it --
each time I set up a new virtual server, the slaves are creating bad named.conf files
for example:
on ns3.vport.net the /etc/named.conf
READS AS FOLLOWS: options { directory "/etc"; pid-file "/var/run/named/named.pid"; };
zone "." { type hint; file "/etc/db.cache"; };
zone "vport.net" { type slave; masters { 192.168.63.51; 216.150.141.240; }; file "/var/named/slaves/vport.net.hosts"; }; zone "hillaryburnett.com" { type slave; masters { 192.168.63.51; 216.150.141.240; }; file "/var/named/slaves/hillaryburnett.com.hosts"; }; zone "verticompartners.com" { type slave; masters { 192.168.63.51; 216.150.141.240; }; file "/var/named/slaves/verticompartners.com.hosts"; }; AND SO ON ...
the Master Server is 192.168.63.61 NOT 192.168.63.51 and it’s Public IP: 216.150.141.245 NOT 216.150.141.240
If I manually change each back to just the correct 192.168.63.61 and delete the Public IP address the zone information transfers correctly.
QUESTION: Where can I edit the Virtualmin Script that is incorrectly writing to the /etc/named.conf file on the Slave NS servers EVERY TIME I create a New Virtual Server????
I have looked at all the sections of the Server Templates including
virtualmin/System Settings/Server Templates/Default Settings/BIND DNS domain
but NO WHERE do I see the Incorrect IP addresses which are beening written automatically to the Slave NS /etc/named.conf file
HELP!
Comments
Submitted by JamieCameron on Sun, 01/30/2011 - 15:33 Comment #1
On the master system, try going to Webmin -> Servers -> BIND DNS Server -> Module Config -> Cluster slave servers , and changing the "Default master server IP for remote slave zones" and "Additional master IP addresses for slave zones" fields. The first sets the IP that slaves will use for the master, and the second can be used to add extra slave IPs for use in slave zones..
Submitted by cmayaud on Mon, 01/31/2011 - 19:08 Comment #2
I found the incorrect "Master" IP address and fixed it manually ... [ webmin -> Networking -> Network Configuration -> Network Interfaces -> eth0]
I'm not sure how it picked up the wrong IP address so I double checked the CentOS Networking and it was correct.
Now both the Zones and the Zone Information are transferring to the Slave Zones
Zone Entries in the /etc/named.conf now contain the correct Private IP address of the Master NS server
HOWEVER, the PUBLIC IP addresses of the "reciprocal" Slave NS server are ALSO being written into each Zone entry!!!
A sample zone from NS2 and NS3
NS2 Private IP: 192.168.63.62
Public IP: 216.150.141.240
Sample from /etc/named.conf
zone "moodiefoodie.com" { type slave; masters { 192.168.63.61; 216.150.141.241; }; file "/var/named/slaves/moodiefoodie.com.hosts"; };
NS3 Private IP: 192.168.63.63
Public IP: 216.150.141.241
Sample from /etc/named.conf
zone "moodiefoodie.com" { type slave; masters { 192.168.63.61; 216.150.141.240; }; file "/var/named/slaves/moodiefoodie.com.hosts"; };
================
ie the Virtualmin (or Webmin Script on Virtualmin Server which is NS1) now --
1) Correctly writes the Private IP address of the Master NS1 to /etc/named.conf each Slave NS2 and NS3
2) BUT IT is ALSO writing the Public IP Address of the other Slave
WHY?
IS this DEFAULT BEHAVIOR?
I would think default would be to the NS1 Private IP address ONLY since that is the Master --- or does a slave “need to think” that every other slave is also a “Master” in case the “Master” is damaged or deleted?
If so, why wouldn’t it it just use the PRIVATE IP since they are both on the same Subnet?
Since I am a “Beginner” user of Virtualmin -- I would Prefer to do everything is “default” unless there is a compelling reason not to (ie I am assuming YOUR DEFAULT is the most commonly used and/or your recommendation), therefore
Q1 - Should the Public IP address of the Slave NS servers be getting written into the Zone files on their “Reciprocal” Slave NS servers???
If not, where do I fix this?
Submitted by cmayaud on Mon, 01/31/2011 - 19:22 Comment #3
A separate question based on your comment
"On the master system, try going to Webmin -> Servers -> BIND DNS Server -> Module Config -> Cluster slave servers , and changing the "Default master server IP for remote slave zones" and "Additional master IP addresses for slave zones" fields. The first sets the IP that slaves will use for the master, and the second can be used to add extra slave IPs for use in slave zones.."
My current setting are:
Default master server IP for remote slave zones: " IP address of hostname"
Add other slave IP addresses to list of masters on slaves? Yes
Additional master IP addresses for slave zones: " None "
You mention the first and the third setting -- but
is the second setting causing the behavior I am seeing in my previous comment?
If so, if the DEFAULT configuration YES or NO?
If DEFAULT is YES, why is it picking the PUBLIC IP rather than the PRIVATE IP (since they are no the same subnet)
Submitted by JamieCameron on Mon, 01/31/2011 - 19:48 Comment #4
So it seems to me that the simplest solution would be for external IPs to be used to transfer zones between your nameservers, as those are the IPs Virtualmin knows about. Is there any reason why this is not possible?
Also, the slaves do need to know the IPs of all the other slaves, in case a master goes down.