[Pdns-users] PowerDNS with GeoIP and MySQL

Aki Tuomi cmouse at youzen.ext.b2.fi
Sun Apr 3 10:33:21 UTC 2016


On Thu, Mar 31, 2016 at 02:22:50PM -0400, Lonnie Cumberland wrote:
> Greetings All,
> 
> In the very distant past, I think that I set up PowerDNS some many years
> ago but have not really used it since that time. Because of this, I would
> not say that I'm a bit new to setting up PowerDNS and hope that someone on
> the list could guide me a bit.
> 
> I have to machines that I want to set up as Authoritative PowerDNS servers,
> but I would also like to add in the GeoIP features as well as the MySQL
> backend so that I can do web administration for the DNS servers.
> 
> Another idea that I was thinking about, although not so critical if it
> can't be done easily, is to have all of this inside a Docker vm on my
> Ubuntu 15.04 machines.
> 
> Are there any installation guides that might available to show me an easy
> way to get all of this installed?
> 
> Any assistance or guidance would be greatly appreciated.
> 
> Cheers and have a great day,
> Lonnie

Hi!

At the moment geoip backend does not support SQL database, there is
geosql backend in the works, but I don't know how that is coming along.

If you are willing to give it a try you could configure your system
to create the YAML configuration file for GeoIP backend using some cron
job or similar. GeoIP backend is able to reload it's configuration without
restarting auth by giving PoweDNS Auth reload command using 

pdns_control reload

As general though, I would delegate one name to the GeoIP backend,
like, geo.yourdomain.com

This way you can, if you want, delegate service names back to MySQL
by defining www.geo.yourdomain.com IN CNAME www-%cn.yourdomain.com. Just be
sure to have an IP for all continents, and it will return

www.geo.yourdomain.com IN CNAME www-eu.yourdomain.com

style of replies, which, if you have the domains in same auth, should
be resolved to an IP eventually.

Another alternative, if you want to take advantage of geoip's features,
is to do it in two steps. In this, you will get

www.geo.yourdomain.com IN CNAME server.yourdomain.com

which will again end up in IP address.

Sample config for first alternative:

domains:
 - domain: geo.yourdomain.com
   ttl: 60
   records:
     geo.yourdomain.com:
       - soa: ns1.geo.yourdomain.com hostmaster.yourdomain.com yada yada...
       - ns: ns1.geo.yourdomain.com
       - ns: ns2.geo.yourdomain.com
  services:
    www.geo.yourdomain.com: 'www-%cn.yourdomain.com'

And for second alternative:

domains:
 - domain: geo.yourdomain.com
   ttl: 60
   records:
     geo.yourdomain.com:
       - soa: ns1.geo.yourdomain.com hostmaster.yourdomain.com yada yada...
       - ns: ns1.geo.yourdomain.com
       - ns: ns2.geo.yourdomain.com
     www-eu.geo.yourdomain.com:
       - cname: server.yourdomain.com
     www-us.geo.yourdomain.com:
       - cname: server-us.yourdomain.com
     www-any.geo.yourdomain.com:
       - cname: server-3.yourdomain.com
  services:
    www.geo.yourdomain.com: ['www-%cn.geo.yourdomain.com', 'www-any.geo.yourdomain.com']

You can read more about geoip backend at

https://doc.powerdns.com/md/authoritative/backend-geoip/

The GeoSQL backend is https://github.com/PowerDNS/pdns/pull/2375
but it appears to be still incomplete.

Aki

> _______________________________________________
> Pdns-users mailing list
> Pdns-users at mailman.powerdns.com
> https://mailman.powerdns.com/mailman/listinfo/pdns-users

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20160403/71f1871d/attachment.sig>


More information about the Pdns-users mailing list