HTTPS clone URL
Subversion checkout URL
fun with geoip and dns
Fetching latest commit...
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
geo_dns : a simple geoip dns server geo_dns is a small, prototype dns server that uses the maxmind geoip db to determine which ip associated with a dns record is the closest to the requesters ip address and serves that up as the ip address for the requested domain author : joe williams <firstname.lastname@example.org> license : apache 2 building/starting : $ sudo apt-get install libgeoip-dev libgeoip1 erlang couchdb * download geoip db, http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz $ git clone email@example.com:joewilliams/erl_geo_dns.git $ cd erl_geo_dns $ make $ erl -pa apps/*/ebin -s geo_dns * for non-defaults adjust apps/geo_dns/ebin/geo_dns.app for the configuration (port, geo db, etc) you would like creating records: * each dns record is a document in couchdb (on localhost by default). the document format is the following: _id : "test.com" iplist : [[a,b,c,d],[a,b,c,d]] ttl : 300 * note that the iplist field is an array of arrays where ip address octets are items in the internal arrays caveats: * this server has never been used in production and is mostly a proof of concept * only supports A records credits: * bine : http://bitbucket.org/kuenishi/bine/src/ * libgeoip-erlang : http://bitbucket.org/mattsta/libgeoip-erlang/src/ * couchbeam : http://github.com/benoitc/couchbeam