|
|
note: it is not clear to me what license is djbdns coming with.some page on wikipedia about djbdns states that as of some date in 2007 djbdns is public domain. however, i see no reason to publish here an already patched source tree - please get the source archive from djbdns website and apply this patch against it. also, there is a patched sourcetree in svn repo that is normally used for code management :)
geoipdns is a extended version of tinydns. it will add support for geoip databases by redefining just a little bit the sense and implementation of "loc %" records
geoipdns also adds the option of having per-user cdb databases in a multi-user environment, if you want to make it safer for the users or if the database grows unexpectedly big.
the "loc" records (defined by % character at the begining of line in the "data" file) are now following a new format:
%cc:ipstart:ipend:user
for example: %XF:10.0.1.0:10.0.23.255:adiciobanu
you will use the XF ip-based record locator as before for defining rrs for a zone:
+people.mud.ro:11.3.0.253:3600::XF
it becomes very useful when you want to attach geoip databases featuring big list of big ip classes (like for example maxmind geoip country lite).
the last field in the loc record denotes the username to which the loc definition pertains. you will usually not need to define users in this record because in a multiuser environment the field will be automatically added from the new "?" records.
a "?" record is a zone<->user map and it defines the location or the username this zone is defined into/for. if the environment variable MULTICDB is defined the the map is in fact a zone<->cdbfile map. if MULTICDB is not defined then its a zone<->username and the username will be mainly used to lookup geoip records inside the same data.cdb file.
there are 3 new environment variables that can be defined:
IPMAP : if you defined this then tinydns will try to lookup ipclass maps for each request that comes in. this is the default djbdns flow, only that now if you dont define IPMAP env var then absolutely to ipclass lookup will be tried.
MULTICDB: if you define this variable then tinydns will assume multiple cdb databases, usually one per user in a multiuser environment. you will want to use this when the number of zones/users/geoip maps are huge (like hundreds of thousands - it will happen in a large environment with few hundreds users and many ipclass geoip map). when MULTICDB is defined then a new record ?zone:key will be used, where key is the cdb file where the mentioned zone is located.
MULTIUSER: if you define this and MULTICDB is not defined then all the records will be hosted as before in one single "data.cdb" file. the ?zone:key records are defining usernames for zones and will be used to lookup geoip ipclass maps inside data.cdb file, if IPMAP env var is defined.
this is a short, weird and probably very stupid introduction written at 0am - for detailed howtos,faqs,scenarios please read the wiki and the blog. don't hesitate to post to geoipdns forum or comment on geoipdns blog. i'll help as much as i can if you find geoipdns useful for you
thank you for your interest ;)
