[master] add geoip support

3504.	[func]		Add support for ACLs based on geographic location,
			using MaxMind GeoIP databases. Based on code
			contributed by Ken Brownfield <kb@slide.com>.
			[RT #30681]
This commit is contained in:
Evan Hunt
2013-02-27 17:19:39 -08:00
parent dad65f7c93
commit 501941f0b6
66 changed files with 4337 additions and 47 deletions

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 AU
10.53.0.2/32 US
10.53.0.3/32 GB
10.53.0.4/32 CA
10.53.0.5/32 CL
10.53.0.6/32 DE
10.53.0.7/32 EH
1 10.53.0.1/32 AU
2 10.53.0.2/32 US
3 10.53.0.3/32 GB
4 10.53.0.4/32 CA
5 10.53.0.5/32 CL
6 10.53.0.6/32 DE
7 10.53.0.7/32 EH

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 AS100001 One Systems, Inc.
10.53.0.2/32 AS100002 Two Technology Ltd.
10.53.0.3/32 AS100003 Three Network Labs
10.53.0.4/32 AS100004 Four University
10.53.0.5/32 AS100005 Five Telecom
10.53.0.6/32 AS100006 Six Company
10.53.0.7/32 AS100007 Seven Communications
1 10.53.0.1/32 AS100001 One Systems, Inc.
2 10.53.0.2/32 AS100002 Two Technology Ltd.
3 10.53.0.3/32 AS100003 Three Network Labs
4 10.53.0.4/32 AS100004 Four University
5 10.53.0.5/32 AS100005 Five Telecom
6 10.53.0.6/32 AS100006 Six Company
7 10.53.0.7/32 AS100007 Seven Communications

Binary file not shown.

View File

@@ -0,0 +1,7 @@
fd92:7065:b8e:ffff::1/128,AS100001 One Systems, Inc.
fd92:7065:b8e:ffff::2/128,AS100002 Two Technology Ltd.
fd92:7065:b8e:ffff::3/128,AS100003 Three Network Labs
fd92:7065:b8e:ffff::4/128,AS100004 Four University
fd92:7065:b8e:ffff::5/128,AS100005 Five Telecom
fd92:7065:b8e:ffff::6/128,AS100006 Six Company
fd92:7065:b8e:ffff::7/128,AS100007 Seven Communications
1 fd92:7065:b8e:ffff::1/128,AS100001 One Systems, Inc.
2 fd92:7065:b8e:ffff::2/128,AS100002 Two Technology Ltd.
3 fd92:7065:b8e:ffff::3/128,AS100003 Three Network Labs
4 fd92:7065:b8e:ffff::4/128,AS100004 Four University
5 fd92:7065:b8e:ffff::5/128,AS100005 Five Telecom
6 fd92:7065:b8e:ffff::6/128,AS100006 Six Company
7 fd92:7065:b8e:ffff::7/128,AS100007 Seven Communications

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32,US,CA,"Redwood City",94063,37.4914,-122.2110,807,650
10.53.0.2/32,US,CA,"Santa Cruz",95060,37.0448,-122.1021,828,831
10.53.0.3/32,US,OK,"Oklahoma City",73120,35.5798,-97.5731,650,405
10.53.0.4/32,US,VA,Ashland,23005,37.7563,-77.4888,556,804
10.53.0.5/32,US,GA,Atlanta,30345,33.8477,-84.2814,524,404
10.53.0.6/32,US,CO,Morrison,80465,39.6081,-105.2072,751,303
10.53.0.7/32,US,AK,Ketchikan,99901,55.6153,-131.5848,747,907
1 10.53.0.1/32 US CA Redwood City 94063 37.4914 -122.2110 807 650
2 10.53.0.2/32 US CA Santa Cruz 95060 37.0448 -122.1021 828 831
3 10.53.0.3/32 US OK Oklahoma City 73120 35.5798 -97.5731 650 405
4 10.53.0.4/32 US VA Ashland 23005 37.7563 -77.4888 556 804
5 10.53.0.5/32 US GA Atlanta 30345 33.8477 -84.2814 524 404
6 10.53.0.6/32 US CO Morrison 80465 39.6081 -105.2072 751 303
7 10.53.0.7/32 US AK Ketchikan 99901 55.6153 -131.5848 747 907

Binary file not shown.

View File

@@ -0,0 +1,7 @@
"fd92:7065:b8e:ffff::1","fd92:7065:b8e:ffff::1","US","CA","Redwood City","94063",37.4914,-122.2110,807,650
"fd92:7065:b8e:ffff::2","fd92:7065:b8e:ffff::2","US","CA","Santa Cruz","95060",37.0448,-122.1021,828,831
"fd92:7065:b8e:ffff::3","fd92:7065:b8e:ffff::3","US","OK","Oklahoma City","73120",35.5798,-97.5731,650,405
"fd92:7065:b8e:ffff::4","fd92:7065:b8e:ffff::4","DE","07","Lotte","",52.2833,7.9167,0,0
"fd92:7065:b8e:ffff::5","fd92:7065:b8e:ffff::5","US","GA","Atlanta","30345",33.8477,-84.2814,524,404
"fd92:7065:b8e:ffff::6","fd92:7065:b8e:ffff::6","US","CO","Morrison","80465",39.6081,-105.2072,751,303
"fd92:7065:b8e:ffff::7","fd92:7065:b8e:ffff::7","US","AK","Ketchikan","99901",55.6153,-131.5848,747,907
1 fd92:7065:b8e:ffff::1 fd92:7065:b8e:ffff::1 US CA Redwood City 94063 37.4914 -122.2110 807 650
2 fd92:7065:b8e:ffff::2 fd92:7065:b8e:ffff::2 US CA Santa Cruz 95060 37.0448 -122.1021 828 831
3 fd92:7065:b8e:ffff::3 fd92:7065:b8e:ffff::3 US OK Oklahoma City 73120 35.5798 -97.5731 650 405
4 fd92:7065:b8e:ffff::4 fd92:7065:b8e:ffff::4 DE 07 Lotte 52.2833 7.9167 0 0
5 fd92:7065:b8e:ffff::5 fd92:7065:b8e:ffff::5 US GA Atlanta 30345 33.8477 -84.2814 524 404
6 fd92:7065:b8e:ffff::6 fd92:7065:b8e:ffff::6 US CO Morrison 80465 39.6081 -105.2072 751 303
7 fd92:7065:b8e:ffff::7 fd92:7065:b8e:ffff::7 US AK Ketchikan 99901 55.6153 -131.5848 747 907

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 one.de
10.53.0.2/32 two.com
10.53.0.3/32 three.com
10.53.0.4/32 four.com
10.53.0.5/32 five.es
10.53.0.6/32 six.it
10.53.0.7/32 seven.org
1 10.53.0.1/32 one.de
2 10.53.0.2/32 two.com
3 10.53.0.3/32 three.com
4 10.53.0.4/32 four.com
5 10.53.0.5/32 five.es
6 10.53.0.6/32 six.it
7 10.53.0.7/32 seven.org

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 One Systems, Inc.
10.53.0.2/32 Two Technology Ltd.
10.53.0.3/32 Three Network Labs
10.53.0.4/32 Four University
10.53.0.5/32 Five Telecom
10.53.0.6/32 Six Company
10.53.0.7/32 Seven Communications
1 10.53.0.1/32 One Systems, Inc.
2 10.53.0.2/32 Two Technology Ltd.
3 10.53.0.3/32 Three Network Labs
4 10.53.0.4/32 Four University
5 10.53.0.5/32 Five Telecom
6 10.53.0.6/32 Six Company
7 10.53.0.7/32 Seven Communications

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 0
10.53.0.2/32 1
10.53.0.3/32 2
10.53.0.4/32 3
10.53.0.5/32 0
10.53.0.6/32 1
10.53.0.7/32 2
1 10.53.0.1/32 0
2 10.53.0.2/32 1
3 10.53.0.3/32 2
4 10.53.0.4/32 3
5 10.53.0.5/32 0
6 10.53.0.6/32 1
7 10.53.0.7/32 2

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 One Systems, Inc.
10.53.0.2/32 Two Technology Ltd.
10.53.0.3/32 Three Network Labs
10.53.0.4/32 Four University
10.53.0.5/32 Five Telecom
10.53.0.6/32 Six Company
10.53.0.7/32 Seven Communications
1 10.53.0.1/32 One Systems, Inc.
2 10.53.0.2/32 Two Technology Ltd.
3 10.53.0.3/32 Three Network Labs
4 10.53.0.4/32 Four University
5 10.53.0.5/32 Five Telecom
6 10.53.0.6/32 Six Company
7 10.53.0.7/32 Seven Communications

Binary file not shown.

View File

@@ -0,0 +1,7 @@
10.53.0.1/32 US CA
10.53.0.2/32 CA BC
10.53.0.3/32 US OK
10.53.0.4/32 AU
10.53.0.5/32 US CO
10.53.0.6/32 CA ON
10.53.0.7/32 NL
1 10.53.0.1/32 US CA
2 10.53.0.2/32 CA BC
3 10.53.0.3/32 US OK
4 10.53.0.4/32 AU
5 10.53.0.5/32 US CO
6 10.53.0.6/32 CA ON
7 10.53.0.7/32 NL

Binary file not shown.

View File

@@ -0,0 +1,7 @@
"fd92:7065:b8e:ffff::1/128",AU
"fd92:7065:b8e:ffff::2/128",US
"fd92:7065:b8e:ffff::3/128",GB
"fd92:7065:b8e:ffff::4/128",CA
"fd92:7065:b8e:ffff::5/128",CL
"fd92:7065:b8e:ffff::6/128",DE
"fd92:7065:b8e:ffff::7/128",EH
1 fd92:7065:b8e:ffff::1/128 AU
2 fd92:7065:b8e:ffff::2/128 US
3 fd92:7065:b8e:ffff::3/128 GB
4 fd92:7065:b8e:ffff::4/128 CA
5 fd92:7065:b8e:ffff::5/128 CL
6 fd92:7065:b8e:ffff::6/128 DE
7 fd92:7065:b8e:ffff::7/128 EH

Binary file not shown.

View File

@@ -0,0 +1,29 @@
The data data files in this directory are sample GeoIP databases,
generated from the corresponding CSV files. Thanks to MaxMind, Inc.
for assitance with producing these files.
Unless otherwise noted, the databases only support IPv4:
GeoIP.dat: Country (IPv4)
GeoIPv6.dat: Country (IPv6)
GeoIPCity.dat: City (IPv4)
GeoIPCityv6.dat: City (IPv6)
GeoIPRegion.dat: Region
GeoIPISP.dat: ISP
GeoIPOrg.dat: Organization
GeoIPDoain.dat: Domain Name
GeoIPASNum.dat: AS Number
GeoIPNetSpeed.dat: Net Speed
GeoIP.dat can also be egenerated using the open source 'geoip-csv-to-dat'
utility:
$ geoip-csv-to-dat -i "BIND9 geoip test data v1" -o GeoIP.dat << EOF
"10.53.0.1","10.53.0.1","171245569","171245569","AU","Australia"
"10.53.0.2","10.53.0.2","171245570","171245570","US","United States"
"10.53.0.3","10.53.0.3","171245571","171245571","GB","United Kingdom"
"10.53.0.4","10.53.0.4","171245572","171245572","CA","Canada"
"10.53.0.5","10.53.0.5","171245573","171245573","CL","Chile"
"10.53.0.6","10.53.0.6","171245574","171245574","DE","Germany"
"10.53.0.7","10.53.0.7","171245575","171245575","EH","Western Sahara"
EOF