Powerdns geo backend howto

nikkiii / powerdns-geodns

An experimental GeoDNS implementation in node for PowerDNS, using the Remote backend and a unix socket.


  • PowerDNS 3.2 or newer with the Remote and MySQL backends
  • node.js (Possibly 0.10, but I use 0.12)
  • A system which supports Unix sockets
  • A Maxmind GeoIP City Database (free or paid, The easiest place to put this is in ./geoip, as the default points to geoip / GeoIP2-City.mmdb)


  1. Install PowerDNS, MySQL, and the required backends
  2. Install node and get a copy of this program, using npm install to install the dependencies (git clone works well for this)
  3. Start the process, optionally using Supervisor.
  4. Restart PowerDNS and run a dig command targeting your server to see if it works.
  5. Create a record in SQL, see the section below for record formats.