You can read Geoipdns document on http://pub.mud.ro/wiki/Geoipdns.
Here are quick steps:
$yum install inotify-tools-devel
#geoipdns use libinotifytools.
$tar xfz vdns-src.tgz
#Add " -include /usr/include/errno.h" to the first line of conf-cc
$LOCAL_CFLAGS="-DUSE_LOCMAPS -DUSE_SFHASH -DUSE_TOUCH_RELOADS -DDEBUG_MODE -DHAVE_MMAP_READAHEAD"
$cp -rp /usr/local/apps/vdns/bin/* /usr/local/bin/
The last step is to allow us access vdnsd vdnsdb without add to PATH.
Now geoipdns is installed. Next we need to configure it so it does geo dns.
$cp run run.tinydns #backup run
#inside run, we change /usr/local/bin/tinydns to/usr/local/bin/vdnsd
#inside Makefile we change tinydns-data to vdnsdb
$svc -t /service/tinydns
Now vdnsd should be running, use "ps -ef" to see that vdnsd is running tinydns is not, but you still should see "supervise tinydns".
Do some dig to make sure everything still works just like Tinydns is running.
Now you need to query the server from at least 2 different locations, otherwise you don't know if geodns works or not.
If you set up dns on local network, such as 192.168.1.0, you can put IP's of local machines in "data" and test geodns from these local machine.
If you have a world facing DNS server and you want to test geodns, you can put the IP's of your home, work, colocated server, or VPS in data, then test dns from those locations.
However if you want to test it fast at where you are, you are also in luck, because there're several online dig sites you can use. I will use 2 such sites as examples:
http://dig.menandmice.com/knowledgehub/tools/dig ip is 220.127.116.11
http://www.subnetonline.com/pages/network-tools/online-dig.php ip is 18.104.22.168
Note these Ip's are as of this writing. If they have changed at the time of your testing, you need to change them too in your data file.
Now the data. Suppose your DNS server name is ns1.myserver.com (replace it with your real dns server name), add these to your /etc/tinydns/root/data file:
%onlinedig1:22.214.171.124:32Do a "make" to update the data hash.
Now you can start testing. First do a "dig @ns1.myserver.com www.example.com" locally. It should say 126.96.36.199. Then go to http://dig.menandmice.com/knowledgehub/tools/dig , enter name server "ns1.myserver.com", enter domain name "www.example.com", click "perform query", it should say 188.8.131.52. Now do the same on http://www.subnetonline.com/pages/network-tools/online-dig.php, it should say 184.108.40.206.
If they display correct fake information, your geo dns works.
Next you need to add real IP location data and setup geo dns for your real domains.
I will talk about this in another post.