abh / geodns

DNS server with per-client targeted responses
Apache License 2.0
1.39k stars 193 forks source link

Is MaxMind mmdb supported? #66

Closed stutiredboy closed 6 years ago

stutiredboy commented 9 years ago

Thanks.

abh commented 9 years ago

No, not yet. It should be a relatively small change though.

They don't have an ASN database in the new format yet.

skyred commented 9 years ago

http://dev.maxmind.com/geoip/geoip2/whats-new-in-geoip2/ says:

Autonomous System Number In GeoIP Legacy, this was returned as a string like "AS1239 Linkem IR WiMax Network". This has been split into two keys, autonomous_system_number, an integer, and autonomous_system_organization, which is a string.

It seems the ASN data is merged with the two geolite2 databases, and using the new tokens.

I was wondering if the plan is to develop to support both formats?

abh commented 9 years ago

Nice; I didn't realize this was in the new format.

Yeah, I think it'd be nice to support the new format instead of using abh/geoip. Hopefully it could be done with a package that doesn't use cgo, too.

I'd like to see benchmarks before switching though.

oschwald commented 9 years ago

I came across this thread and was a bit curious about the relative speed myself. I made a simple benchmark for country lookups using my maxminddb package. Here are the results on my machine:

PASS
Benchmark_GetCountry-8    500000          2601 ns/op
BenchmarkMaxMindDB-8      500000          2744 ns/op
ok      test    2.753s

If you use a static IP, the results are again similar but about 1000 ns/op less.

As for ASN, there isn't a free ASN database for GeoIP2, but it is included with the ISP database.

AnoopAlias commented 6 years ago

https://support.maxmind.com/geolite-legacy-discontinuation-notice/

I guess we won't be able to use the GeoIP legacy one January 2, 2019

Is there a plan to support the new Lite2 format?

abh commented 6 years ago

Yeah, it is supported in the 3.0 branch.

AnoopAlias commented 6 years ago

you mean the 'dev' branch right as I tried building using the 3.0 branch and its still using libGeoIP.so.1 ?

I was unable to build the dev branch - any instructions for doing that?

abh commented 6 years ago

Oh, yeah - dev sounds right!

abh commented 6 years ago

@AnoopAlias Why didn't dev build for you? Can you open a new issue for that?

abh commented 6 years ago

Fixed in 5048bc60, ecb34ab4, 26ba43ddad and 06a109192 (and maybe others).