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-zones
scp /etc/bind/slave-zones slave-dns@bind9box:slave-zones > /dev/null
Using SSH keys, a file of all of my domains is created on the secondary box daily.
2. A cronjob daily runs the following on my secondary box:
Code:
echo > /etc/bind/slave-zones.conf
for i in `cat /home/slave-dns/slave-zones`; do
echo "zone \"$i\" {" >> /etc/bind/slave-zones.conf
echo " type slave;" >> /etc/bind/slave-zones.conf
echo " file \"slave.$i\";" >> /etc/bind/slave-zones.conf
echo " masters { 123.123.123.123; };" >> /etc/bind/slave-zones.conf
echo " notify no;" >> /etc/bind/slave-zones.conf
echo "};" >> /etc/bind/slave-zones.conf
echo >> /etc/bind/slave-zones.conf
done
/etc/init.d/bind9 restart > /dev/null
I have bind9 including /etc/bind/slave-zones.conf in my configuration file.
Let me know how you get on!
Recent comments
1 day 18 hours ago
1 day 20 hours ago
2 days 8 hours ago
2 days 11 hours ago
2 days 15 hours ago
2 days 21 hours ago
3 days 7 hours ago
3 days 8 hours ago
3 days 17 hours ago
3 days 18 hours ago