OpenNetAdmin

Track. Automate. Configure.

Home About Features Community Develop
Download this project as a tar.gz file

Import BIND DHCP/DNS?

tin

16-11-2009 17:37:50

I vaguely remember reading something about importing existing DHCP and DNS into ONA... But now I can't find any info on doing so. Was I dreaming it?

Reason I ask is I'm fairly happy with ONA and would like to put our existing data in. We only have about 200 entries to put in, but I'd rather not be the one typing it all :mrgreen:

Matt

18-11-2009 07:52:09

I have made mention of some work I did in this area. I think I can help out with at least some of the work to import some data.

So a quick mention of what I do have:

* ISC DHCP tool that will extract out subnet and host information. It simply creates a CSV that can then be turned into a DCM.PL command. The work on this tool is not very complete but it at least can get a nice list that can be used
* I only have a tinydns based conversion tool. I do not yet have one for BIND. There are tools out there that convert from bind to tinydns I believe so this may be an option
* If you have cisco network gear I have tools that will ensure subnets/interfaces/nat entries in your router configuration are in the database.
* nmap scan tool to help find hosts on the network that are not in the database.

So, bottom line is that I have several tools that are in various states of usefullness (thats why I've not yet released them) but I do have many that would probably be a big help. I can get those to you and we can see where that gets us.

The first thing to start with is trying to get all of your subnets defined in the system. I'd say the cisco tool is best for that.

... gotta run but I think I can help in this area and hopefully turn them into more user friendly tools for all...

tin

18-11-2009 15:20:26

We have a whole 1 subnet to enter, so manual entry there is easy :mrgreen:

How complete is the plugin system? Is it in a state that I could write my own plugin to do imports like this? Is there any documentation on how it works?

Matt

18-11-2009 20:00:07

One subnet ehh.. well yep that will be easy.

Complete is an interesting term.. :).. I'd say it is pretty functional, at least for the things I have built with it so far. I know it has a few areas it could do more in but it will at least give people an ability to write something that augments the system in various ways. I think it would be cool if you would write a plugin!

Alas, there is no documentation for plugins. I've not even attempted that since I suspect it will change a bit more. However I have an "example" plugin that shows the basic hooks that you can use to add the plugin to a menu or display screen. I'd also say you can look at some of my other plugins to see how I implemented various things.

I'll get some those posted here tomorrow for you to have a look at.

It sounds like I may have a few tools already that will help you out and then we can work on filling in some gaps.

psyber

28-11-2009 15:26:29

I vaguely remember reading something about importing existing DHCP and DNS into ONA... But now I can't find any info on doing so. Was I dreaming it?

Reason I ask is I'm fairly happy with ONA and would like to put our existing data in. We only have about 200 entries to put in, but I'd rather not be the one typing it all :mrgreen:


sysbot has a script that will convert bind type files into ONA
viewtopic.php?f=4&t=65

tin

30-11-2009 16:00:47

Just tried that perl script... Doesn't seem to want to work unfortunately. Just sits there doing (for all I can tell) nothing.

Oh well. I'll keep plugging in numbers. Shouldn't take too long.

Matt

30-11-2009 19:47:21

Sorry I've not gotten back to you on the other tools I have.. I'm slammed at work right now and that is where those scripts are right now. ..... :?

tin

30-11-2009 21:35:05

I got about half of our student computers entered today, before getting distracted and moving onto other projects. I wouldn't bother too much about it now. I'll probably finish later this week.

yeled

08-02-2010 08:17:54

Hi Matt,

do you have this Cisco script handy? Any form of releasability would be appreciated.

Matt

08-02-2010 15:54:36

yeled,

I can give you the code that will work with the current release but it will be busted when I release the next update. I would suggest waiting for the next update as this script (and several others) will be released as plugins that can be installed instead of hacked in one offs. :)

If you can wait for that I think it would be best.. If you are still interested I can try and get you the files and info on where they go.

Also for the script to work, it requires you to have configuration archives in ONA. This is another piece to be worked out but you can get started with loading configurations into your ONA instance now. It requires the use of the dcm.pl cli tool that you can get from the downloads section.

here is an example:

dcm.pl -r config_add type=IOS_CONFIG host=router.example.com config=/path/to/local/configfile

This should upload the config and attach it to the router called 'router.example.com'... then later the check script can use the most recent configuration stored in ONA to compare to the data in the database. There is a set of automated scripts for loading cisco configuration into ONA that I will release as well after the new version of ONA is out.

Hope that helps........

dmo

09-02-2010 01:55:32

Sounds great. I'm looking forward to this feature being implemented.

Matt, as soon as I get the Cisco IOS import script working, I'm going to try and mod it to work on Nortel devices. Hopefully between me and some other users we can add config support for a wide range of devices.