mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Add an IPv6 range to the test MMDB DBs
This commit is contained in:
parent
b586b59b69
commit
975a6ae981
4 changed files with 5 additions and 3 deletions
Binary file not shown.
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 3 KiB |
Binary file not shown.
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 3 KiB |
|
@ -1,9 +1,10 @@
|
||||||
These .mmdb databases were created with the mmdbwriter from MaxMind [1] for
|
These .mmdb databases were created with the mmdbwriter from MaxMind [1] for
|
||||||
testing purposes. See the main.go file. They only contain information about
|
testing purposes. See the main.go file. They only contain information about
|
||||||
LBL's network ranges:
|
the following LBL/Berkeley network ranges:
|
||||||
|
|
||||||
128.3.0.0/16
|
128.3.0.0/16
|
||||||
131.243.0.0/16
|
131.243.0.0/16
|
||||||
|
2607:f140::/32
|
||||||
|
|
||||||
Rebuild with:
|
Rebuild with:
|
||||||
|
|
||||||
|
|
|
@ -44,12 +44,13 @@ func writeDB(fname, name string, record mmdbtype.Map, nets ...*net.IPNet) {
|
||||||
func main() {
|
func main() {
|
||||||
_, net1, _ := net.ParseCIDR("128.3.0.0/16")
|
_, net1, _ := net.ParseCIDR("128.3.0.0/16")
|
||||||
_, net2, _ := net.ParseCIDR("131.243.0.0/16")
|
_, net2, _ := net.ParseCIDR("131.243.0.0/16")
|
||||||
|
_, net3, _ := net.ParseCIDR("2607:f140::/32")
|
||||||
|
|
||||||
// The ASN record.
|
// The ASN record.
|
||||||
asnRecord := mmdbtype.Map{}
|
asnRecord := mmdbtype.Map{}
|
||||||
asnRecord["autonomous_system_number"] = mmdbtype.Uint32(16)
|
asnRecord["autonomous_system_number"] = mmdbtype.Uint32(16)
|
||||||
asnRecord["autonomous_system_organization"] = mmdbtype.String("Lawrence Berkeley National Laboratory")
|
asnRecord["autonomous_system_organization"] = mmdbtype.String("Lawrence Berkeley National Laboratory")
|
||||||
writeDB("GeoLite2-ASN.mmdb", "My-ASN-DB", asnRecord, net1, net2)
|
writeDB("GeoLite2-ASN.mmdb", "My-ASN-DB", asnRecord, net1, net2, net3)
|
||||||
|
|
||||||
// The Location record.
|
// The Location record.
|
||||||
locRecord := mmdbtype.Map{
|
locRecord := mmdbtype.Map{
|
||||||
|
@ -69,5 +70,5 @@ func main() {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
writeDB("GeoLite2-City.mmdb", "My-City-DB", locRecord, net1, net2)
|
writeDB("GeoLite2-City.mmdb", "My-City-DB", locRecord, net1, net2, net3)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue