[Pdns-users] PDNS geo backend - different origin for different domains?
Code Pixie
codepixie at hotmail.co.uk
Sat Jul 16 16:21:08 UTC 2011
Hi,
I'm working for a hosting provider, and experimenting with pdns's geo backend so we can offer geo resolving to our clients.
I followed the tutorial at http://blog.trungson.com/?p=103 which describes how to get the geo backend working, and have it working per their example, though their example always returns a CNAME in the blitzed.org domain, even if your queried a different domain.
If all your domains share the same server pools (e.g. the "europe" pool is the european server pool for all the domains you're hosting), then that works fine, but for us that is not the case - we need to point to a geo CNAME for europe.domain1.com, europe.domain2.com etc depending what query came in.
Looking in my maps file, I have (for local testing purposes):
$RECORD * $ORIGIN iso.example.com. 56 europe 826 europe 840 northamerica 0 global
So, if I have any domain pointed in, it looks up and returns a geo result under iso.example.com. - because that's the $ORIGIN for the map.
What would be ideal is, if I lookup geo.foo.com. that it would return europe.iso.foo.com. and not europe.iso.example.com.
1) Is there a way to specify a different map (and thus, a different $ORIGIN) for each domain that is delegated to the geo backend?
2) I tried adding multiple $RECORD entries (e.g. *.domain1.com, *.domain2.com etc) but that didn't seem to do anything
3) If not, is there any way I can make the ORIGIN the same as the domain queried for the geo response? I tried removing the domain suffix and the trailing '.' from the $ORIGIN (e.g. "$ORIGIN iso") hoping that it would return europe.iso.foo.com. (or just europe.iso which would imply .foo.com.) but instead it returned a fully qualified europe.iso. with no further domain suffix.
4) If 1/2 are not possible, is anyone familiar enough with the geo backend code to be able to point out where it might be possible to patch for this functionality? (e.g. removing the '.' in (2) might be easiest?)
5) What are my other options other than setting up a new PDNS instance, on a new IP address for every one of our hosting clients who wants to use the geo feature? (This is probably not an option!)
Thanks in advance for any ideas... hopefully I'm missing something simple :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20110716/30b6035d/attachment.html>
More information about the Pdns-users
mailing list