opennetadmin / ona

OpenNetAdmin IP Address Management (IPAM) system
opennetadmin.com
GNU General Public License v2.0
142 stars 35 forks source link

Virtual Domains #30

Open mattpascoe opened 11 years ago

mattpascoe commented 11 years ago

Just gonna put this out here and see if any one takes an interest. One of our people thinks ONA is so awesome kinda expected it to do something like this. I thought it was a great idea. I hate creating and keeping up to date 3 different domains that are basically all the same.

Situation: You have a domain and to protect your namespace you register the .com .org and .net equivalents

Problem : You want everyone who visits any of the domains to be able to land in the one you actively manage (lets say .com)

Solution: Virtual Domains. Basically a way to generate the bind files for domains that are basically copies of other domains. You manage one but ONA generates zone files for all 3. So the www.foo.org and www.foo.net A records get created when you create an A record for www.foo.com. any changes in the .com propagate to the .org .net etc domains automagically.

Bonus: Exceptions. I want everything the same but www should be independently changed across all 3 domains (i.e. each points to a different place)

Thoughts comments?

mattpascoe commented 11 years ago

sooo.. here is my short answer......

The zone files should be built with $ORIGIN references.. then you simply have one zone file that ONA builds that way. Then in the config file you would have ONA manage the .com zone as usual but you would then manually define the .org .net etc zones in a header file (I.E. in an included file outside of the current ONA GUI) to point at the same .com zone data file. Then the one zone file would answer for all the variants of the $ORIGIN...

This would be the shortest path to doing what you want.. the problem is that the current build script is not doing the $ORIGIN thing and I dont remember if I have the include header stuff set up yet (I dont use the bind based DNS process, I use tinydns so I havnt looked at the code in awhile to remember where I'm at :)

Hope that makes sense.. should be pretty simple to implement.. just takes a bit of testing.

The bonus thing you want is a bit more tricky but could possibly be done with $INCLUDE in some way as well..

These are all things that are light on ONA but heavy on implementation methods.

Copied this from the old bug system.. its good info...