Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 956 Categories, Downloaded 50.244.925 Times

RIR to DNS converter 0.1

  Date Added: January 07, 2010  |  Visits: 1.377

RIR to DNS converter

Report Broken Link
Printer Friendly Version


Product Homepage
Download (97 downloads)



RIR to DNS converter is a tool to convert Regional Internet Registry data to a DNS country lookup zone. You can use it to build your own DNS zone for looking up country codes from IP addresses. It uses data directly from RIPE, ARIN, APNIC, LACNIC, and AFRINIC. The data can be updated on a schedule of your choosing. The input data comes from: ftp://ftp.afrinic.net/pub/stats/afrinic/delegated-afrinic-latest ftp://ftp.apnic.net/pub/stats/apnic/delegated-apnic-latest ftp://ftp.arin.net/pub/stats/arin/delegated-arin-latest ftp://ftp.ripe.net/pub/stats/ripencc/delegated-ripencc-latest ftp://ftp.lacnic.net/pub/stats/lacnic/delegated-lacnic-latest The input data format is described in: http://www.apnic.net/db/rir-stats-format.html The output is a BIND 9 zone file that can be used to look up country codes in a similar fashion to in-addr.arpa. For example, to find out what country 203.30.47.58 is: host 58.47.30.203.rir.example.com 58.47.30.203.rir.example.com has address 127.0.65.86 where 65 and 85 are ASCII for A and U, which means 203.30.47.58 is in Australia (AU). HOW TO USE IT Just feed it the above delegated- -latest files into stdin and it will spit out the zone file to stdout. The zone file will only have the IP addresses, so you could $INCLUDE it into a zone file that contains NS records, SOA, $ORIGIN, etc. WHY USE IT You dont need the resolution of MaxMinds GeoIP database, but you do want something that is free and you want it kept up to date on a schedule that you decide. You could use this to block or tag email based on countries, block or redirect visitors to your website based on end-user country, and so on. Be very careful about blocking mail this way, though, as you may block legitimate email. Instead of blocking outright, use it in a SpamAssassin rule to add something to the spam level, based on where the email comes from. HOW IT WORKS The RIR files contain ranges of IP addresses, and indicate what CC each range is allocated to. At the simplest level, rir2dns just sorts the ranges then iterates through the IPs in each range and generates a reverse-dns-style A record that represents the country code. HOW IT WORKS - IN DETAIL Rather than iterate through each IP address, the program tries to skip through entire classes at a time (256 IPs, 65536 IPs, etc). Rather than iterate through each IP, the loop iterates through classes or IP ranges (whichever are smaller at the loop control), using control-breaks to accummulate neighbouring ranges where possible so that entire classes that are in the same country dont generate huge numbers of records. Firstly, IPs are considered to be 4-digit numbers, but in base-256. In other words, each octet is dealt with as if it were a single base-256 digit. This turns out to be convenient because optimisations of large chunks of IP space can be done by looking for places where least-significant base-256 digits are zero. Next, IP ranges are broken down into the following sub-ranges: Optional individual IP addresses (ie: 4 octets) Optional A-class ranges (ie: 3 octets) Optional B-class ranges (ie: 2 octets) Optional C-class ranges (ie: 1 octet) Optional B-class ranges (ie: 2 octets) Optional A-class ranges (ie: 3 octets) Optional individual IP addresses (ie: 4 octets) Considering that there is a pattern here, Im sure theres an elegant way to handle breaking this down into two loops (one reducing the octets and one increasing the octets), but I cant be bothered, so Ill break it down into seven loops. Kind of hard-coded, but at least its simple. For ease of processing, the IP addresses are actually converted to 32-bit numbers, then back again. This simplifies mathematics and looping through ranges. Thats pretty much it, really... Note that currently there are about 80,000 RIR records between all five registries. This takes about 35 seconds on a 2.4GHz P4 to process, and generates a 26MB file with around 3/4 million lines (RRs). This causes BIND to use about 100MB or so of memory, and on a slow machine will probably cause it to take too long to reply, while it searches the zone. That size zone can take a minute or two to load, which is quite a while. Basic algorithm: Read & process RIR data: Read RIR ranges Sort RIR ranges by start IP address Glue together contiguous ranges of the same country For each range Generate the IPs at the start of the range Generate the A-classes at the start of the range Generate the B-classes at the start of the range Generate the C-classes in the middle of the range Generate the B-classes at the end of the range Generate the A-classes at the end of the range Generate the IPs at the end of the range. Get RIR to DNS converter at SourceForge.net. Fast, secure and free downloads from the largest Open Source applications and software directory. Build your own DNS zone for looking up country codes from IP addresses. Uses data directly from RIPE, ARIN, APNIC, LACNIC, and AFRINIC. Update the data on a schedule of your choosing.

Requirements: No special requirements
Platforms: Linux
Keyword: Converter Country Country Lookup Data To A Dns Country Lookup How Internet Registry Ip Addresses Ips Range Ranges Regional Internet Registry Registry Data Rir Use It Zone File
Users rating: 0/10

License: Freeware Size: 614.4 KB
USER REVIEWS
More Reviews or Write Review


RIR TO DNS CONVERTER RELATED
Dial-up Networking Tools  -  Compaq Laptop to Hotspot Converter 3.0.0.4
Compaq Laptop to Hotspot Converter converts your Compaq laptop to a wireless hotspot. By this software, your Compaq laptop (Windows platform) is turned into a Wi-Fi hotspot so that you can share the Internet with your second laptop, friends or...
4.4 MB  
Database Tools  -  Dump a database file to a pickle 1.0
This script converts the database file given on the command line to a pickle representation.The default is hash. If a pickle file is named it is opened for write access (deleting any existing data). If no pickle file is named, the pickle output is...
 
Server Management  -  Write a file to a WebDAV Server 1.0
This script is an extremely simple example of using homepage to write a file to a WebDAV server. This version does not use any authentication mechanism.
 
Miscellaneous  -  Finding the value passed to a function by name 1.2
Sometimes inside a decorator that creates a function with a generic (*args, **kwargs) signature, you want to access a value passed for a particular parameter name to a wrapped function, but don't know whether that value will be passed as a...
 
Miscellaneous  -  Dynamically added methods to a class 1.0
This script allows you to add a method to a class at an arbitrary point in your code. The method is available instantly to all already existing instances and of course ones yet to be created. If you specify method_name then that name is used for...
 
Database Tools  -  Find all object privileges, system privileges, and roles granted to a user or role 1.0
These two SQL*Plus scripts run SQL to find all privileges and roles granted to a specified user or role. Each script spools its output to a file which is then opened in Notepad.
10 KB  
Communication  -  Convert Time Array to a Datenum Array 1.1
UTC time (universal time convention) is used in ANSI-C standard for defining time. This is measured in seconds since 1970, at the Prime Meridian.The UTC2Datenum_array function takes a M x 1 array of UTC time values and converts it to a M x 1 array...
10 KB  
Development Tools  -  Interface to a LBFGS solver 1.0
This submission contains an interface to a LBFGS solver for unconstrainted minimization problems of the formmin_{x} f(x) + c*|tilde{x}|,where x are the parameters, f is a scalar valued real function, c is a positive scalar (default value=0), |.|...
10 KB  
Development Tools  -  Calculation of distances from a given set of points to a set of segments 1.0
CSMV calculates distances from a given set of points to a set of linear segments SYNOPSIS: [squared_distances_to_segments I]=csmv(P,R,Q,to_plot) [squared_distances_to_segments I]=csmv(P,R,Q,...) INPUT P,R : arrays of coordinates of 2n segment...
10 KB  
DNS Tools  -  dnshistory 1.3
dnshistory project provide a means for storing a history of DNS and Name changes for the IP Addresses extracted from web log files. The major target being that multiple analyses of older log files do not require re-lookups of IP Address to...
112.64 KB  
NEW DOWNLOADS IN NETWORK & INTERNET, DNS TOOLS
Network & Internet  -  Free WiFi Hotspot 3.3.1
Free WiFi Hotspot is a super easy solution to turn your laptop or notebook into a portable Wi-Fi hotspot, wirelessly sharing your internet connections like DSL, Cable, Bluetooth, Mobile Broadband Card, Dial-Up, etc. through the built-in wireless...
1.04 MB  
Network & Internet  -  Easy Uploads 1.8
Easy uploads is a file storage media streaming application designed by Filestreamers that allows you to upload, store, and stream your files from their virtually unlimited file storage server. Easy Uploads can backup,share, and stream your files...
615.97 KB  
Network & Internet  -  PacketFence ZEN 3.1.0
PacketFence is a fully supported, trusted, Free and Open Source network access control (NAC) system. Boosting an impressive feature set including a captive-portal for registration and remediation, centralized wired and wireless management, 802.1X...
1024 MB  
Network & Internet  -  django-dbstorage 1.3
A Django file storage backend for files in the database.
10.24 KB  
Network & Internet  -  SQL Inject Me 0.4.5
SQL Inject Me is a Firefox extension used to test for SQL Injection vulnerabilities. The tool works by submitting your HTML forms and substituting the form value with strings that are representative of an SQL Injection attack.
133.12 KB  
DNS Tools  -  Maintain 3.0.0 RC1
Maintain is a multi-user, web based management tool for DNS and DHCP. Maintain was created using PHP, Perl and MySQL. Maintain was developed by Oregon State Universitys Network Engineering to replace a set of command line scripts that edited DNS...
1024 KB  
DNS Tools  -  DNSA 0.5
DNSA and DNSA-NG are swiss knife tools for Linux designed to test several DNS security issues. The most important one is a full wifi support using 2 cards: - The first in monitor mode which capture 802.11 traffic - The second associated to...
583.68 KB  
DNS Tools  -  dnshistory 1.3
dnshistory project provide a means for storing a history of DNS and Name changes for the IP Addresses extracted from web log files. The major target being that multiple analyses of older log files do not require re-lookups of IP Address to...
112.64 KB  
DNS Tools  -  FollowMeIP 1.3
FollowMeIP provides an IP address tracking utility. FollowMeIP is a small client that allows you to retrieve the IP address of your machine over the Web. It works by periodically sending your IP address to the FollowMeIP server, from where you...
808.96 KB  
DNS Tools  -  Addns.pl 1.2
Addns.pl is a self-contained DynDNS update client for DynDNS.org (and possibly others). It supports a variety of IP detection methods including external webcheck/router pages. file. Addns.pl has been tested and works on these operating systems:...
17.41 KB