Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

asn field is showing NA even when available in MaxMind #62

Open
Uriel-Carrasquilla opened this issue Jan 27, 2022 · 3 comments
Open

asn field is showing NA even when available in MaxMind #62

Uriel-Carrasquilla opened this issue Jan 27, 2022 · 3 comments

Comments

@Uriel-Carrasquilla
Copy link

Uriel-Carrasquilla commented Jan 27, 2022

asn option in rgeolocate not working when accessing MaxMind Enterprise database.

@Uriel-Carrasquilla
Copy link
Author

Uriel-Carrasquilla commented Jan 27, 2022

when using inspect, I get the autonomous system. when using rgeolocate, it shows "NA" i.e. not-available.
./mmdbinspect -db ~/geoip/GeoIP2-Enterprise.mmdb 172.217.5.100
[
{
"Database": "/home/uriel/geoip/GeoIP2-Enterprise.mmdb",
"Records": [
{
"Network": "172.217.5.100/19",
"Record": {
"continent": {
"code": "NA",
"geoname_id": 6255149,
"names": {
"de": "Nordamerika",
"en": "North America",
"es": "Norteamérica",
"fr": "Amérique du Nord",
"ja": "北アメリカ",
"pt-BR": "América do Norte",
"ru": "Северная Америка",
"zh-CN": "北美洲"
}
},
"country": {
"confidence": 99,
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "EE. UU.",
"fr": "États Unis",
"ja": "アメリカ",
"pt-BR": "EUA",
"ru": "США",
"zh-CN": "美国"
}
},
"location": {
"accuracy_radius": 1000,
"latitude": 37.751,
"longitude": -97.822,
"time_zone": "America/Chicago"
},
"registered_country": {
"geoname_id": 6252001,
"iso_code": "US",
"names": {
"de": "USA",
"en": "United States",
"es": "EE. UU.",
"fr": "États Unis",
"ja": "アメリカ",
"pt-BR": "EUA",
"ru": "США",
"zh-CN": "美国"
}
},
"traits": {
"autonomous_system_number": 15169,
"autonomous_system_organization": "GOOGLE",
"connection_type": "Corporate",
"domain": "1e100.net",
"isp": "Google Cloud",
"organization": "Google Cloud",
"user_type": "hosting"
}
}
}
],
"Lookup": "172.217.5.100"
}
]

results when using maxmind in the rgeolocate package from R CLI. Notice the "asn" request.

maxmind("172.217.5.100", maxmind_file, c("continent_name", "country_code", "city_name", "latitude", "longitude","asn"))

returns:
continent_name country_code city_name latitude longitude asn
1 North America US 37.751 -97.822 NA

the maxmind_file points to the MaxMind enterprise database in R:

maxmind_file
[1] "~/geoip/GeoIP2-Enterprise.mmdb"

@nhi-vanye
Copy link

Any pointers on how to fix - I've just bought the commercial DB-IP database and want the traits data.

Never hacked on a R module before...

@nhi-vanye
Copy link

I've got a fix that works for me, PR soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants