PowerDNS
(Initial page, global config) |
(Geobackend configuration) |
||
| Line 1: | Line 1: | ||
'''PowerDNS''' [http://www.powerdns.com] is the DNS server we use for ''geographic DNS balancing'', and possibly "normal" authoritative DNS in future as well. This page explains configuration. | '''PowerDNS''' [http://www.powerdns.com] is the DNS server we use for ''geographic DNS balancing'', and possibly "normal" authoritative DNS in future as well. This page explains configuration. | ||
| − | == | + | == Configuration == |
It's best to bind PowerDNS to a specific IP, instead of <tt>INADDR_ANY</tt>. To do that, put: | It's best to bind PowerDNS to a specific IP, instead of <tt>INADDR_ANY</tt>. To do that, put: | ||
| Line 30: | Line 30: | ||
launch=geo | launch=geo | ||
| + | |||
| + | === Geobackend configuration === | ||
| + | |||
| + | Specify the zone that will contain the "georecords": | ||
| + | |||
| + | geo-zone=''gdns.wikimedia.org'' | ||
| + | |||
| + | Every zone needs a SOA record, and so does a geo-zone. Only the ''SOA name'' and ''hostmaster fields'' are important. Specify them comma separated: | ||
| + | |||
| + | geo-soa-values=''gdns0.mediawiki.org'',''hostmaster@mediawiki.org'' | ||
| + | |||
| + | Every zone needs to have NS records as well, to specify the authoritative servers: | ||
| + | |||
| + | geo-ns-records=''gdns0.mediawiki.org'',''gdns1.mediawiki.org'' | ||
| + | |||
| + | Geobackend reads in an [[Wikipedia:rbldnsd]]-style zonefile, to map specific IPs to countries. Specify the path to this file: | ||
| + | |||
| + | geo-ip-map-zonefile=''/usr/local/etc/powerdns/zz.countries.nerd.dk.rbldnsd'' | ||
| + | |||
| + | Every record in the "geo zone" has its own "map file", mapping every country to some CNAME. Geobackend will read all files in the directory specified here, and use the filename as the recordname: | ||
| + | |||
| + | geo-maps=''/usr/local/etc/powerdns/directormaps/'' | ||
| + | |||
| + | Every DNS record has a TTL, and geobackend currently only allows to specify these globally. Default is ''1 hour'' for normal (CNAME) records, ''1 day'' for NS records: | ||
| + | |||
| + | geo-ttl=''3600'' | ||
| + | geo-ns-ttl=''86400'' | ||
| + | |||
| + | == External links == | ||
| + | * [http://docs.powerdns.com PowerDNS documentation] | ||
| + | * [http://cvs.blitzed.org/geo-dns/README?rev=HEAD Geobackend README] | ||
Revision as of 17:53, 11 January 2005
PowerDNS [1] is the DNS server we use for geographic DNS balancing, and possibly "normal" authoritative DNS in future as well. This page explains configuration.
Configuration
It's best to bind PowerDNS to a specific IP, instead of INADDR_ANY. To do that, put:
local-address=IP query-local-address=IP
A backend like geobackend can't make use of caching, since returned results will be different depending on "who's asking". Therefor, disable caching:
query-cache-ttl=0 cache-ttl=0 negquery-cache-ttl=300
If just geobackend is used, multithreading is unneccessary, and may even impact performance. Make pdns singlethreaded with:
distributor-threads=1
In geobackend itself, there are no wildcard records, so pdns shouldn't have to check for them:
wildcards=no
Running privileged is unnecessary (of course make sure these user/group exist):
setuid=pdns setgid=pdns
Launch the backend that will be used, in the specified order:
launch=geo
Geobackend configuration
Specify the zone that will contain the "georecords":
geo-zone=gdns.wikimedia.org
Every zone needs a SOA record, and so does a geo-zone. Only the SOA name and hostmaster fields are important. Specify them comma separated:
geo-soa-values=gdns0.mediawiki.org,hostmaster@mediawiki.org
Every zone needs to have NS records as well, to specify the authoritative servers:
geo-ns-records=gdns0.mediawiki.org,gdns1.mediawiki.org
Geobackend reads in an Wikipedia:rbldnsd-style zonefile, to map specific IPs to countries. Specify the path to this file:
geo-ip-map-zonefile=/usr/local/etc/powerdns/zz.countries.nerd.dk.rbldnsd
Every record in the "geo zone" has its own "map file", mapping every country to some CNAME. Geobackend will read all files in the directory specified here, and use the filename as the recordname:
geo-maps=/usr/local/etc/powerdns/directormaps/
Every DNS record has a TTL, and geobackend currently only allows to specify these globally. Default is 1 hour for normal (CNAME) records, 1 day for NS records:
geo-ttl=3600 geo-ns-ttl=86400