[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: bind9 ns1 and ns2 not authoritative

Gavin Westwood wrote:
On 22/08/08 15:04, randall wrote:
the number of zones will be several hundreds, and the reason i planned to use smbind is because i need them added by somebody who is not familiar with hand editing files.

any script recommendations?

I also use smbind and on the primary DNS server, you should be able to script an INSERT into the appropriate SQL tables with a standard zonefile configuration, or if you already have them in existing Bind zone files, there is an import script that I modified - please mail me offlist if you want me to email it to you. I was planning to make a fork off of smbind as I've altered my copy slightly and the project had seemed to be dead when I downloaded it earlier this year, but I've not had time. I also see there's been some activity on the bug tracker since then...

I'm not sure if smbind can be used for secondary domains as there is no option for this, but I'm sure it could be altered to do so.



Gavin Westwood

http://www.solutium.net - Going the extra mile to provide a fast, helpful, reliable Web Hosting service.

after my NoOb discovery that all slave entries have to be added manually on ns2 i found very little ready made scripts available on google for automation and those i found where pretty messy or not usable on debian, or i'm looking in the wrong places.

some hypothetical questions here i'd like to ask you since i guess you have more insight in this.

smbind uses mysql to store the zone data and then produce the zone text files in /etc/smbind/zones and /etc/smbind/smbind.conf to feed it to bind. right? wouldn't it make sense to use the existing option to have php produce the slave entries in the same fashion as the master entries in /etc/smbind/smbind.conf ?

one could use mysql replication but then you would a mysql instance and trigger a php script and on the slave as well or have bind query mysql direcly. to make it simple i guess, one could create /etc/smbind/masterzones.conf and /etc/smbind/slavezones.conf and call a script to scp or rsync to transfer the slavezones.conf

this would only require a small modification to commit.php i suppose and a lot cleaner then the cron jobs i've seen on google so far.

i never did much with php but this should be doable i think in some sleepless nights, so please stop me if i'm re-inventing the wheel here ;)

if (isset($rebuild)) {
   $confres = $dbconnect->query("SELECT name FROM zones ORDER BY name");

   $cout = "";
   while($conf = $confres->fetchrow()) {
       $cout .= "zone \"" . $conf[0] . "\" {
           type master;
           file \"" . preg_replace('/\//','-',$conf[0]) . "\";

Reply to: