All the named sites under ISPConfig are up and running well and accessible by domain.name. But the system says BIND is not running on boot up. I can manually start it and all still runs well. This isn't a problem just a general configuration question as ISPConfig seems to be running a separate DNS than the main BIND one. I want to write some code that does dynamic DNS updating of the sites on my server. Does ISPConfig use the same DNS configuration files as the default BIND? I'm curious how the names are still resolving when the BIND9 server is stopped.
There is no folder /etc/bind on my system. The configuration files are in /var/lib/named/etc/bind/. This is how it was installed by the 'Perfect Server' instructions.
Indeed there is, thanks. I need a script that updates the IP of primary zone files when the IP changes. One way is using nsupdate to directly modify them. But if I'm not mistaken, ISPConfig would wipe out those changes next time it re-creates the VHOSTS. So, maybe a better idea to write a php script that will update the values in the ispconfig database then trigger a rewrite of the vhosts and a restart of the name server. Does this make sense? I'm using DynDNS service for the main nameserver domain updates but don't want to pay an account for every domain name I use in addition to that one. I guess my concern is that ISPConfig would re-read the IP addresses from MySQL before re-writing the zone files, rather than having them already stored in memory. True? Have a great weekend.
Something like this maybe...??? Code: <?php // // Configuration // $dbhost = ''; // MySQL Host Name $dbuser = ''; // MySQL User Name $dbpass = ''; // MySQK Password $remoteip = ''; // Some remote site that will echo your IP address // // Update Script // $ip = file_get_contents($remoteip); if ($ip !== false) { $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die('Error connecting to mysql'); mysql_select_db('db_ispconfig'); $query = "UPDATE dns_isp_dns SET dns_soa_ip = $ip WHERE dns_soa_ip = *"; mysql_query($query) or die('IP update failed.'); $query = "UPDATE dns_a SET ip_adresse = $ip WHERE ip_adresse = *"; mysql_query($query) or die('A update failed.') $query = "UPDATE dns_isp_dns SET status = 'u' WHERE status = *"; mysql_query($query) or die('DNS update failed.'); mysql_close($conn); $update = shell_exec('touch /home/admispconfig/ispconfig/.run'); } else { die('Error getting IP address.'); } ?> I have a remote server that echos the IP using SSI. The intent of this is to update the main external IP and any A records (which I'm using for www.).