Is there a way to initiate a 3rd party API to create a slave dns on a non-webmin system?

3 posts / 0 new
Last post
#1 Fri, 06/10/2011 - 11:12
harty83

Is there a way to initiate a 3rd party API to create a slave dns on a non-webmin system?

I'm hosting with Linode and thus have their DNS manager setup to be my slave DNS servers. Obviously I can't install Webmin on their DNS manager machine and thus I want to use Linodes DNS manager API to create the slave zones when Virtualmin creates a server. Is this possible? Would I have to hack Virtualmin to initiate the creation of the slave zone or is there a way to tell Virtualmin to call up xyz script to do it when it creates the server without hacking?

Thanks! Alan

Fri, 06/10/2011 - 15:18
sfatula

Actually, yes, it is possible. You have to write the script of course. But, one place to set this is "Virtualmin Configuration -> Actions upon Server and User Creation". See the field "Command to run after making changes to a server". You'll have to check for the appropriate state, i.e., new server and do the call(s) to Linodes API. And, handle scenarios like maybe the program fails as you need to redo the command later, etc.

Of course, there are other possibilities too. Perhaps the user has security to create DNS records for non hosted zones for example? If so, requires a different solution. But most people don't allow this I would presume.

It's a great way to take advantage of free DNS servers instead of running your own. Esp since they are often geographically separated, etc. The issue you want to think about though is what happens if you have to switch from Linode?

Fri, 06/10/2011 - 23:42
harty83

Well, I'm using them as slave DNS so the only thing I would have to worry about is updating domain ns servers. Linode also allows domain transfers (axfr) so for any master servers, between the API and the axfr feature, I can export the domains pretty easily.

Thanks! Alan

Topic locked