Steps to install: Installation of BIND 9.4.3-P1 with geodns patch -------------------------------------------- This document explains how to install BIND the geodns patch. We will use /usr/local/src/ to unpack source code and /usr/local/bind as installation directory for BIND. 1) Download BIND 9.4.3-P1 from http://www.isc.org/sw/bind/ 2) Download GeoIP C API from http://www.maxmind.com/app/c wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz 3) Unpack both in /usr/local/src/ (geoip needs to be unpacked into a directory called "geoip" for the below commands to work) 4) Compile GeoIP and install in /usr/local/geoip/: ./configure --prefix=/usr/local/geoip make make install 5) Download the city data http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz wget http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz 6) Extract city data to /usr/local/share/GeoIP, and rename to GeoIP.dat 7) Patch and install bind: cd /usr/local/src/ patch -p0 < bind-9.4.2-P1-geodns-patch.diff cd bind-9.4.3-P1 CFLAGS="-g -O2 -I/usr/local/geoip/include" LDFLAGS="-L/usr/local/geoip/lib -lGeoIP" ./configure --prefix=/usr/local/bind make && make install Make an init script, config files, etc, start named, and voila. =-=-=-=-=-=-=-=-=-=-=-=-= Gentoo Specific Instrutions: 1) Download BIND 9.4.3-P1 tarball emerge -f =net-dns/bind-9.4.3_p1 cp /usr/portage/distfiles/bind-9.4.3-P1.tar.gz /usr/local/src/ 2) Download GeoIP C API from http://www.maxmind.com/app/c wget http://geolite.maxmind.com/download/geoip/api/c/GeoIP.tar.gz -O /usr/local/src/GeoIP.tar.gz 3) Extract both into /usr/local/src cd /usr/src/local tar xzf bind-9.4.3-P1.tar.gz tar xzf GeoIP.tar.gz 4) Install GeoIP emerge geoip ./configure --prefix=/usr/local/geoip make make install 5) Download the city data http://www.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz 6) Extract city data to /usr/local/share/GeoIP, and rename to GeoIP.dat 7) Patch bind patch -p0 < bind-9.4.3-P1-geodns.patch 8) Build and install bind into /usr/local/bind cd bind-9.4.3-P1 CFLAGS="-g -O2 -I/usr/local/geoip/include" LDFLAGS="-L/usr/local/geoip/lib -lGeoIP" ./configure --prefix=/usr/local/bind make && make install