[Pdns-users] GeoIPBackend testing wanted

Aki Tuomi cmouse at youzen.ext.b2.fi
Fri Sep 5 11:04:56 UTC 2014


There is now new GeoIP backend, which would love being tested by someone:


You can get the patch easiest from


There is documentation for it, but it's embedded into the xml file, so 
you'll find copy of the docs attached.

Aki Tuomi
-------------- next part --------------
14. GeoIP backend

14.1. Prerequisites
14.2. Configuration Parameters
14.3. Zonefile format

Table A.13. GeoIP backend capabilities

│Native     │Yes│
│Master     │No │
│Slave      │No │
│Superslave │No │
│Autoserial │No │
│DNSSEC     │No │

The GeoIP backend can be used to distribute queries globally using an MaxMind
IP-address/country mapping table, currently avaible for debian and ubuntu for
free. Other formats are not yet supported but will be in the future. The only
format supported at the moment is country listing.

This allows visitors to be sent to a server close to them, with no appreciable
delay, as would otherwise be incurred with a protocol level redirect.
Additionally, the Geo Backend can be used to provide service over several
clusters, any of which can be taken out of use easily, for example for
maintenance purposes.

14.1. Prerequisites

To compile the backend, you need libyaml-cpp 0.5 or later and libgeoip.

You must have geoip database available. As of writing, on debian/ubuntu
systems, you ca use apt-get install geoip-database to get one, and the backend
is configured to use the location where these files are installed as source. On
other systems you might need to alter the database-file and database-file6
attribute. If you don't need ipv4 or ipv6 support, set the respective setting
to "". Leaving it unset leaves it pointing to default location, preventing the
software from starting up.

14.2. Configuration Parameters

These are the configuration file parameters that are available for the GeoIP
backend. geoip-zones-files is the only thing you must set, if the defaults
suite you.


    Specifies the full path of the data file for IPv4 to use.


    Specifies the full path of the data file for IPv6 to use.


    Specifies the full path of the zone configuration file to use.

14.3. Zonefile format

Zone configuration file uses YAML syntax. Here is simple example. Note that the
‐ before certain keys is part of the syntax.

- domain: geo.example.com
  ttl: 30
      - soa: ns1.example.com hostmaster.example.com 2014090125 7200 3600 1209600 3600
      - ns: ns1.example.com
      - ns: ns2.example.com
      - mx: 10 mx.example.com
      - a:
      - txt: hello world
    service.geo.example.com: '%co.%cn.service.geo.example.com'

Keys explained


    Mandatory root key. All configuration is below this


    Defines a domain. You need ttl, records, services under this.


    TTL value for all records


    Put fully qualified name as subkey, under which you must define at least
    soa: key. Note that this is an array of records, so ‐ is needed for the


    Defines one or more services for querying. The format supports following
    placeholders, %% = %, %co = 3-letter country, %cn = continent, %af = v4 or
    v6. There are also other specifiers that will only work with suitable
    database and currently are untested. These are %re = region, %na = Name
    (such as, organisation), %ci = City.

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

More information about the Pdns-users mailing list