12

At ultradns.com or on comwired.com you can select multiple A records depending on location;

x.com (United States) 174.1.1.1
x.com (Europe) 65.2.2.2

So requests are routed based on proximity/where they come from.

You can do that as many times as you like, which is a great service for our distributed application needs.

However, we want to manage this on our own servers. Do you know any linux package that does this ?

4
  • I'm not quite sure how this simpledns works but to clarify my question, we need something like this for linux: simpledns.com/newsitem.aspx?id=2405
    – Devrim
    Sep 16, 2009 at 4:59
  • This post is a duplicate: stackoverflow.com/questions/2805231/… aka use pydns Dec 26, 2012 at 4:44
  • 1
    how can a later post make the previous one 'duplicate' ?
    – Devrim
    Dec 28, 2012 at 23:41
  • Wouldn't be correct solution to use BGP routing instead of this DNS hacks to route users based on location to particular destination?
    – jirib
    Oct 30, 2013 at 14:23

4 Answers 4

8

There are patches available to do GeoIP in various DNS servers.

Bind: http://www.caraytech.com/geodns/

Good writeup of Bind patches, includes RPMs: http://www.devco.net/archives/2006/07/11/location_aware_bind.php

djbdns: http://www.anders.com/cms/276/tinydns.GeoIP.patch/djbdns/Geographically.Aware

Also interesting is this hack, which involves not patching Bind: http://phix.me/geodns/

8

Wikipedia uses the free (as in free speech, not only as in free beer) software PowerDNS to do so, with a geoip backend.

Just remember that all the GeoIP databases are imperfect and that geographical location is a poor tool to estimate the network distance to a given server. Protocols like ICS are a much better solution.

2
  • +1 : ICS looks very interesting, although it will require a fair bit of infrastructure work before becoming more practical. Sep 16, 2009 at 12:46
  • Thanks for the answer. Though we could do as good (good as in naah not oh no) without the parentheses...
    – Devrim
    Sep 16, 2009 at 14:35
2

Also see http://code.google.com/p/ruby-pdns/ for something that lets you do GeoIP and a whole lot more.

1
  • wow this looks fantastic
    – Devrim
    Sep 25, 2009 at 19:18
2

I would just like to point out the ip2location BIND ACL file is subscription based, and so costs. The methods described at http://phix.me/geodns/ allow anyone to create their own BIND ACL file free of charge, using the freely downloadable MaxMind CSV file, though granted, the ip2location one is probably more accurate (accuracy is what most people pay for).

On a tangent, if anyone is looking for geo-aware BIND on the IPv6 network, I have updated the page at http://phix.me/geodns/ with further scripts which can process 128 bit numbers within a CSV file. I have just found out today that MaxMind do offer a downloadable GeoIPv6 CSV file, which these scripts will operate over to produce a GeoIPv6.acl file for BIND.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .