RSS구독하기:SUBSCRIBE TO RSS FEED
즐겨찾기추가:ADD FAVORITE
글쓰기:POST
관리자:ADMINISTRATOR

GeoDNS BIND patch

[Download]

What is it?

A 40-line patch for BIND to add geographical filters support to the existent views in BIND. Look at it.

What can I use it for?

The most popular use of this patch is to send web site visitors to their nearest web server. Suppose you have a site called www.example555.com with two web servers: one in the US and one in England. You can use this patch in order for visitors from Europe to connect to the server in England and all other visitors to the server in the US. This is just one example of its usage. There are probably many others.

Why do I need this patch, can't I do it already with BIND?

BIND 9.2 implements the concept of having multiple views of a single zone. Depending on the client that queries the server, different answers can be returned for the same query. However, BIND only allows to segment clients by IP address or IP address prefixes. This makes it cumbersome if you want to, for instance, target all the networks in France.

How does it work?

By adding the functionality available in Maxmind's GeoIP to BIND, it is possible to filter whole countries without having to specify IP addresses. This is an excerpt of a sample BIND configuration using this GeoDNS patch:

view "north_america" {
      match-clients { country_US; country_CA; country_MX; };
      recursion no;
      zone "example555.com" {
            type master;
            file "pri/example555-north-america.db";
      };
};
view "south_america" {
      match-clients { country_AR; country_CL; country_BR; country_PY; country_PE; country_EC; country_CO; country_VE; country_BO, country_UY; };
      recursion no;
      zone "example555.com" {
            type master;
            file "pri/example555-south-america.db";
      };
};
view "other" {
      match-clients { any; };
      recursion no;
      zone "example555.com" {
            type master;
            file "pri/example555-other.db";
      };
};

As you can see, the zone example555.com has 3 different views, depending on the location of the country.

What do I need to use it?

  1. Download the patch
  2. Download BIND 9.4.1-P1 in source code form, from ISC.
  3. Download MaxMind's GeoIP C API.
  4. Compile and install GeoIP according to the instructions provided. Note down in which directory it is installed.
  5. Unpack BIND source code.
  6. Apply the patch with the patch command (see instructions in INSTALL file)
  7. Compile BIND and install into your favourite directory.
  8. Configure, test and run

Disclaimer

The original patch for BIND 9.2.4 was written by Nicolas Moldavsky, working for Caraytech, a company in Argentina. Daniel Gerzo adapted the patch to work against BIND 9.4.1-P1. the Neither the authors nor their employers provide any guarantee that this software will work, not even for the purpose it was written for. Use it under your own risk. We have no relation whatsover with Maxmind apart from being a client of their GeoIP Country product. BIND is a product of the Internet Software Consortium. We plan to use this patch for e-planning, our ad server software.

FAQ

Can version of BIND is this patch for?
It is a patch for 9.4.1. It will probably work on later versions. Only 3 files are patched.
Has this patch been tested thoroughly?
No, it has only been tested in development environments. We plan to deploy it in production soon.
How much does the IP to country database cost?
Maxmind offers a free version of their database which is included when you download the API. For pricing information of the more complete database please refer to Maxmind's web site.
Do you provide binary versions of this patch?
No, we don't. If you want to compile it and offer a binary version in your web site, be free to do so.
What files does the patch modify?
lib/dns/include/dns/acl.h: to add a new type of acl element: dns_aclelementtype_ipcountry
lib/dns/acl.c: dns_aclelement_match to add functionality to match the ipcountry type of acl element
lib/isccfg/parser.c: to parse the new types in the config file

Feedback

Send all comments or feedback to nico=at=caraytech===com==. Include [bind-patch] in the subject or otherwise your mail will be filtered.

2013/03/28 13:58 2013/03/28 13:58
http://zosel.net/trackback/44
ZOSEL:Too much is as bad as too little...!! 자공(子貢)이 공자에게 "사(師:子張의 이름)와 상(商:子夏의 이름)은 어느 쪽이 어집니까?" 하고 묻자, 공자는 "사는 지나치고 상은 미치지 못한다"고 대답하였다. "그럼 사가 낫단 말씀입니까?" 하고 반문하자, 공자는 "지나친 것은 미치지 못한 것과 같다(過猶不及)"고 말하였다.
Too much is as bad as too little...!! 자공(子貢)이 공자에게 "사(師:子張의 이름)와 상(商:子夏의 이름)은 어느 쪽이 어집니까?" 하고 묻자, 공자는 "사는 지나치고 상은 미치지 못한다"고 대답하였다. "그럼 사가 낫단 말씀입니까?" 하고 반문하자, 공자는 "지나친 것은 미치지 못한 것과 같다(過猶不及)"고 말하였다.
전체 (209)
리눅스시스템 (92)
윈도우시스템 (16)
프로그램 (7)
네트워크시스템 (7)
최근관심 (1)
«   2024/05   »
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31  
  1. yeezyboost-350.co.uk  2021
    yeezyboost-350.co.uk
  2. 강남역 풀싸롱  2021
    강남역 풀싸롱
  3.   2021
  1. 2018/02 (1)
  2. 2017/03 (2)
  3. 2016/12 (2)