![]() |
Automate DNS slave creation
i've got two servers here, each one has an installation of ISPConfig installed. Server1 is my webserver and is the master for the dns, Server2 is the slave.
Is it possible to automate the creation of the slave entries on the second ISPConfig server? At this point, whenever a reseller of mine adds a new domain, i've got to logon the second server and add the slave entry manually. The updates are being pushed perfectly, all that is working. Only the creating of the slave entries is a problem at this time... Could somebody help me? |
This is where MyDNS would be handy, you would just point both DNS servers to the same MySQL database (replicated of course) and let it run, both would have the same zones and records files(so to speak) available. Basically you need to figure out a way to pass from Server A to Server B, the names of the domains to replicate/create in named.conf and let it do it's thing. A simple set of php scripts could do the heavy lifting, but be sure to lock down the security such that only the two machines can talk to each other.
I would expect you would have to at least put a call into the ISPConfig code to run said script however... I'm not sure where, since I've about given up on hacks to ISPConfig 2.x hacks, everytime I do it, I upgrade and forget to back up my hacks.. :D |
To have it run a script when you update something, add the script to the end of:
/root/ispconfig/scripts/writeconf.php Add things write above the line that says: Code:
echo "ende\n"; |
Quote:
I posted a topic in the Installation forum http://www.howtoforge.com/forums/sho...79&postcount=7 Basically I have a web server with ISPConfig and Master/Slave DNS machines. I want the ISPConifg web server to manage the creation of DNS zones and send it to my DNS machines. I was thinking that my DNS machines both need to act as slaves to the ISPConfig web server, but when resolving name servers on the web the DNS machines would play their Master/Slave role. |
Hi,
I have not solution for autocreate au dns zone |
I came up with a solution to this problem a number of months ago. I have ISPConfig running on one server, and bind on its own on another. My working setup is as follows:
1. A cronjob daily runs the following on my ISPConfig box: Code:
grep "^zone" /etc/bind/named.conf | grep -v "arpa" | awk -F \" '{print $2}' | awk 'length > 1' > /etc/bind/slave-zones2. A cronjob daily runs the following on my secondary box: Code:
echo > /etc/bind/slave-zones.confLet me know how you get on! |
This looks like a stable solution, i'll give it a go. Thanks a million times :)
Question tho... Won't this result in a very long list on the slave server with duplicate entries? It exports the entire master server every time... |
I prefer keeping dead threads dead, but to complete the last question:
Quote:
Code:
echo > /etc/bind/slave-zones.conf |
| All times are GMT +2. The time now is 02:21. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2013, vBulletin Solutions, Inc.