Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > MyDNSConfig > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 1st September 2007, 01:24
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default MyDNS (Master) -> Bind (Slave) Support

Not content with running a second MyDNS slave through MySQL replication I set about getting xfers working with Bind. Not too difficult but I wanted a way so that if a new domain is added to MyDNS, the named.conf was updated with the new zones or indeed removed. So far I have created an add domain frontend that adds a new record in MyDNS and goes through a standard templete. From there it updates a date with the following structure:

NS0 | NS1 | NS2
UPDATE | UPDATED | UPDATE

On this example there is 3 Bind slaves. I have written a script in Perl that runs every 5 minutes a checks this additional table created and regrabs all the zones and writes the config when an update is required but I was wondering if we could possibly build in support for this in MyDNS and bundle the Perl script with MyDNSconfig for users who want to run Bind as slaves to a MyDNS master. It would be as simply as add new domain or remove old domain changes these table values for the Perl script to come along and redo the configs and perform an "rndc reload" on the slave but I thought it was worth asking.

What does anyone think?
Reply With Quote
Sponsored Links
  #2  
Old 1st September 2007, 21:30
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

I think you can simply allow zone transfers in the MyDNS configuration file and then let BIND fetch the zones from the MyDNS master.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 2nd September 2007, 16:32
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
Default

No you're misunderstanding me - this is for when a NEW domain is added to get the new configs created for Bind to know to ask the master for the zones.

Otherwise it's not what I would call the perfect solution - requiring you to go to the slaves and add additional lines into the named.conf.

Basically my script looks at the mysql db that mydns uses and regenerates the configs if "Update" is required for that particular nameserver - this is purely for when a new domain is added/removed using mydnsconfig. ofcourse the xfers stuff takes care of changes to the zones but without the extra glue the whole thing requires manual intervention and I wonder if we could offer a Mydnsconfig option with extra bind support along with my perl script.
Reply With Quote
  #4  
Old 3rd September 2007, 21:23
falko falko is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Quote:
Originally Posted by todgerme
Otherwise it's not what I would call the perfect solution - requiring you to go to the slaves and add additional lines into the named.conf.
You always have to create the slave zone in BIND. OTherwise BIND wouldn't know which zones to fetch from the master. It wouldn't even know the master.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 4th September 2007, 14:45
todgerme todgerme is offline
Member
 
Join Date: Dec 2005
Location: Belfast, Northern Ireland
Posts: 54
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Quote:
Originally Posted by falko
You always have to create the slave zone in BIND. OTherwise BIND wouldn't know which zones to fetch from the master. It wouldn't even know the master.
Yes I know but I have created a Perl script that looks at the Mysql in mydns and creates the configs but I need a way to tie it into mydnsconfig and wondered if we couldn't help produce a version that works with mydns and bind slaves.

Basically I have a database table called "dns_slaves", then I have 3 columns for ns0, ns1, ns2

The values allowed are update or updated.

The Perl script looks at this table and if NS0 has a value of update, the Perl script does a select of the active domains and writes the configs and reloads bind. The script then changes this value for NS0 from update to updated. Xfers then takes of the rest.

What I wanted to get opinion was, if a domain was added/removed via mydnsconfig it would automatically update the dns_slaves table and allow the entire platform to be glued together for people who want to run mydns master with bind slaves.

Hopefully this all makes sense at this point. So basically we will have that perfect solution as I mentioned that works from one frontend.

Let me know or perhaps you can point me in the right direction of the files in mydnsconfig that I need to modify. I can then release it on the mydnsconfig site as a patch to help with bind slaves. It would be a shame not to share.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
BIND as a slave for MyDNS master MooktaKiNG General 26 3rd July 2010 22:55
ERROR: The PHP binary coming with ISPConfig does not work properly on your system! micko_escalade Installation/Configuration 35 30th March 2007 11:31
Install Error Alpha Installation/Configuration 9 6th April 2006 19:48
setup fails on debian 3.1 dtrumbower Installation/Configuration 7 7th March 2006 13:42
ISPConfig Failure on SuSe 9.3 gimhan90 Installation/Configuration 13 2nd February 2006 10:29


All times are GMT +2. The time now is 16:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.