[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:
7
bin/tests/system/geoip/data/GeoIP.csv
Normal file
7
bin/tests/system/geoip/data/GeoIP.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIP.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIP.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPASNum.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPASNum.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPASNum.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPASNum.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPASNumv6.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPASNumv6.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPASNumv6.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPASNumv6.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPCity.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPCity.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPCity.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPCity.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPCityv6.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPCityv6.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPCityv6.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPCityv6.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPDomain.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPDomain.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPDomain.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPDomain.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPISP.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPISP.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPISP.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPISP.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPNetSpeed.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPNetSpeed.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPNetSpeed.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPNetSpeed.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPOrg.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPOrg.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPOrg.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPOrg.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPRegion.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPRegion.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPRegion.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPRegion.dat
Normal file
Binary file not shown.
7
bin/tests/system/geoip/data/GeoIPv6.csv
Normal file
7
bin/tests/system/geoip/data/GeoIPv6.csv
Normal 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
|
||||
|
BIN
bin/tests/system/geoip/data/GeoIPv6.dat
Normal file
BIN
bin/tests/system/geoip/data/GeoIPv6.dat
Normal file
Binary file not shown.
29
bin/tests/system/geoip/data/README
Normal file
29
bin/tests/system/geoip/data/README
Normal 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
|
||||
Reference in New Issue
Block a user