RSS feed

PowerDNS Multiple MySQL Backends

January 10th, 2010 | Posted in Blog, Linux, PowerDNS | No Comments

http://doc.powerdns.com/modules.html

To launch two backends of the same type, you can assign a name to each launch like this;

launch=gmysql:connection1,gmysql:connection2

gmysql-connection1-host=10.10.10.1
gmysql-connection1-user=pdns
gmysql-connection1-dbname=pdns

gmysql-connection2-host=10.10.10.2
gmysql-connection2-user=pdns
gmysql-connection2-dbname=pdns



PowerDNS 2.9.22 RPM’s

February 5th, 2009 | Posted in Linux, PowerDNS | No Comments

The latest (dynamic) RPM’s for PowerDNS can be downloaded below. Please note, these RPM’s only include the MySQL and pipe backend!

 

pdns-2.9.22-1.i386.src.rpm

pdns-2.9.22-1.i386.rpm



PowerDNS 2.9.21-2 RPM's

January 17th, 2009 | Posted in Linux, PowerDNS | No Comments

The latest (dynamic) RPM’s for PowerDNS can be downloaded below. Please note, these RPM’s only include the MySQL and pipe backend!

 

pdns-2.9.21-2.x86_64.src.rpm

pdns-2.9.21-2.i386.src.rpm

pdns-2.9.21-2.x86_64.rpm

pdns-2.9.21-2.i386.rpm

 

Or you can download the GPL source tarball which includes the spec files for both x86_64 and i386

 

pdns-2.9.21-2.tar.gz



PowerDNS with Geo Backend

December 6th, 2008 | Posted in Linux, PowerDNS | 1 Comment

A short guide on how to setup powerdns with the geo and mysql backends to redirect visitors to servers closer to their geographic location.

So how does it work?

We delegate geo.www.domain.com to our powerdns servers that run the geo backend. The backend looks up the IP address of the user’s resolver in a data structure obtained from zz.countries.nerd.dk.

This returns the ISO country code, which is then fed through a map file to determine what CNAME to respond with. Our www.domain.com record is actually just a CNAME to www.geo.domain.com which is driven by the geo backend. Our map contains the following:

$RECORD www
$ORIGIN domain.com

After the above each ISO country code is listed and essentially where you want to send them, for example:

0 pool
# Andorra
20 eu
# United Arab Emirates
784 eu
# Afghanistan
4 eu
# Antigua and Barbuda
28 eu
# Angola
24 za

0 pool is a round robin DNS pool of all our servers located across the globe.

The rest, as you can see, is redirected to either eu or za. Note, the file is HUGE and only a few entries has been pasted here.

Our powerdns configuration looks like this:

geo-zone=geo.domain.com
geo-soa-values=ns0.domain.com,hostmaster@domain.com
geo-ns-records=ns0.domain.com,ns1.domain.com
geo-ip-map-zonefile=/home/geo/zz.countries.nerd.dk.rbldnsd
geo-maps=/etc/powerdns/geo-maps
launch=geo,gmysql

The zz.countries.nerd.dk.rbldnsd file countains all countries and their ISO country numbers. More information and how to get a copy of this (rsync once a week) can be obtained from http://countries.nerd.dk/more.html.

Our normal DNS domains and records are stored in MySQL, more information regarding that can be found in the powerdns documentation.

Here are some DNS query examples:

dig @ns0.coretanium.net nosuchdomainhere.com A

;www.nosuchdomainhere.com. IN A

www.nosuchdomainhere.com. 604800 IN CNAME www.geo.nosuchdomainhere.com.
www.geo.nosuchdomainhere.com. 3600 IN CNAME eu.nosuchdomainhere.com.
eu.nosuchdomainhere.com. 86400 IN A 87.194.37.132

As you can see, www.nosuchdomainhere.com is a CNAME to www.geo.nosuchdomainhere.com, from there it passes through the geo backend and it says your coming from lets say Germany, our geo mapping file then says country code 276 needs to go to eu(.nosuchdomainhere.com) and eu.nosuchdomainhere.com resolves to 127.0.0.1.

And that’s it. A brief explanation on how to use powerdns with the geo backend.




Categories