Updated config for GeoIP in BIND

I posted previously about using GeoIP in BIND with Debian. Today I altered my config a little for my Europe region so that it includes the Middle East and Africa as these regions are largely connected to the Internet via Europe anyway. Saves them being directed to an American server which isn’t the closest available.

My new config looks a little something like this:


view "EuropeMidEastAfrica" {
        match-clients {
                // Europe
                country_AD; country_AL; country_AM; country_AT;
                country_AZ; country_BA; country_BE; country_BG; country_BY;
                country_CH; country_CZ; country_DE; country_DK; country_EE;
                country_ES; country_FI; country_FR; country_GE; country_GR;
                country_HR; country_HU; country_IE; country_IS; country_IT;
                country_KZ; country_LI; country_LT; country_LU; country_LV;
                country_MC; country_MD; country_ME; country_MK; country_MT;
                country_NL; country_NO; country_PL; country_PT; country_RO;
                country_RS; country_RU; country_SE; country_SI; country_SK;
                country_SM; country_TR; country_UA; country_UK; country_VA;

                // Middle East
                country_AE; country_AF; country_BH; country_CY; country_DJ;
                country_DZ; country_EG; country_EH; country_ER; country_IL;
                country_IQ; country_IR; country_JO; country_KG; country_KM;
                country_KW; country_LB; country_LY; country_MA; country_MR;
                country_OM; country_PK; country_PS; country_QA; country_SA;
                country_SD; country_SO; country_SY; country_TJ; country_TM;
                country_TN; country_UZ; country_YE;

                // East Africa
                country_BI; country_DJ; country_ER; country_ET; country_KE;
                country_KM; country_MG; country_MU; country_MW; country_MZ;
                country_RW; country_SC; country_SO; country_SS; country_TZ;
                country_UG; country_YT; country_ZM;

                // Central Africa
                country_AO; country_CD; country_CF; country_CG; country_CM;
                country_GA; country_GQ; country_ST; country_TD;

                // North Africa
                country_CE; country_CN; country_DZ; country_EG; country_LY;
                country_MA; country_PT; country_SD; country_TN;

                // South Africa
                country_BW; country_LS; country_NA; country_SZ; country_ZA;
                country_ZW;

                // West Africa
                country_BF; country_BJ; country_CI; country_CV; country_GH;
                country_GM; country_GN; country_GW; country_LR; country_ML;
                country_MR; country_NE; country_NG; country_SH; country_SL;
                country_SN; country_TG;
        };
        match-recursive-only yes;
        allow-recursion { "zonetransfers"; };
        allow-transfer { "zonetransfers"; };
        include "/etc/bind/named.conf.default-zones";
        include "/etc/bind/named.conf.zones";
        zone "10mbit.biz" {
                type master;
                file "/etc/bind/geoip/eu.10mbit.biz.hosts";
        };
};

One thought on “Updated config for GeoIP in BIND

  1. Pingback: Daemonizing rsync on Debian | criten.org

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>