Questions tagged [geoip2]

64 questions
0
votes
1 answer

Python: Pass a list of IP addresses to geoip2 for location lookup

I am looking for a way of analysing a massive list of IP addresses with location data. This list is about 10000000 entries. For the moment I am using geoip2 module from maxmind. The original code can look for a single IP address entry and print…
Arash M
  • 23
  • 5
0
votes
1 answer

Mod_security won't block countries other than

I have Apache configured with mod_security and GeoIP2. GeoLite2-Country.mmdb is being downloaded by geoipupdate triggered by cron every week. My /etc/modsecurity/modsecurity.conf configuration looks like: SecRuleEngine On SecRule ARGS:modsecparam…
DisplayName
  • 479
  • 2
  • 7
  • 20
0
votes
1 answer

Getting the user country using GeoIP2 in Nginx

I've been pulling my hair trying to get this thing to work properly, but it seems that whatever I do, the X-Country gets the value "US", since that's the country of the last IP address in the X-Forwarded-To header. This is one of Google's load…
damd
  • 6,116
  • 7
  • 48
  • 77
0
votes
1 answer

GeoDjango: Getting accurate device location with geoip2

I am trying to get the users device location. But the geoip2 returns a location far away from users location (almost 20km-25km). When I connect my device through a mobile network it shows a different location when I connect my device with the…
Debopriyo Das
  • 135
  • 2
  • 15
0
votes
2 answers

NGINX GeoIP2 blocking countries and implementing custom 403 page

This is driving me mad, hopefully someone can help. I have the following warning: But the 403 page is not friendly to blocked countries, I want to redirect people who are blocked to a custom 403 page. map $geoip2_data_country_code $allowed_country…
0
votes
1 answer

Java geoip2 java.io.FileNotFoundException:

I use geoip2 to determine the country by ip. During development and testing of the code, I have no problems, but when I run the compiled archive, I encounter a java.io.FileNotFoundException exception. I understand that this is because the path to…
0
votes
2 answers

How can I compile a GeoLite CSV file into MMDB again?

I have made a few corrections to location names in a GeoLite2 CSV file. My site only retrieves locations from the MMDB file, so how can I compile back the changed CSV file into the MMDB binary again. I searched everywhere for a solution but can't…
0
votes
3 answers

Updating GeoLite2 CSV files

Since 1.1.2020 one need to register with MaxMind to get access to the GeoLight2 databases. I have just sucessfully installed the geoipupdate procedure and can update the GeoLite2 databases. But I would need the CSV-versions - as those are the used…
Kurt Ludikovsky
  • 682
  • 1
  • 6
  • 21
0
votes
1 answer

Django geoip2 + Maxmind working locally, but not in production?

I'm able to get a response object and render it to the page locally, but on my live site it doesn't work. I'm using Maxmind's binary database, which is the GeoLite2-City.mmdb file in my project folder. This also works in my website's Ubuntu 16.04…
Jake 1986
  • 582
  • 1
  • 6
  • 25
0
votes
1 answer

Redirection of urls based on geo location on apache 2 server using mod_geoip2

My use case is of showing different content based on the user country. I do have separate HTML5 pages for different countries in separate directories. I want to internally redirect the user to different directories based on his location. I am not…
0
votes
1 answer

How to fix "django.contrib.gis.geoip2 has no attribute GeoIP2"

I am trying to retrieve my visitors' location. After successfully retrieving the IP Adress I want to use the GeoIP2 object to get information about the…
0
votes
1 answer

How to fix "java.lang.NoSuchMethodError" for geoip2 java running under Hive

I am having trouble when executing a UDF with geoip2 (maxmind) as dependency under Hive 2.3.4 (java 8) the same code works fine under older versions of hive that use java 7 and also under Presto that use java 8. I have tried using exact dependencies…
0
votes
1 answer

GeoIP2 with Directory Location not working | without directory location work

my problem is this. GeoIP2 does not work if I specify location with a directory, but without a location already. with Directory Location > not working location /test { if ($allowed_country = no) { return 403; } } without Directory…
Kaneko
  • 1
  • 1
0
votes
1 answer

Is it possible that 3 IP addresses from the same network come from different countries?

https://www.maxmind.com/en/geoip2-precision-demo shows 3 different countries for 5.62.61.176, 5.62.61.196 and 5.62.61.172. Is it possible?
vvkatwss vvkatwss
  • 3,345
  • 1
  • 21
  • 24
0
votes
1 answer

geoip2 for nginx not wirking

i have Problem with compile "geoip2" for nginx. my ".so" is not working. my install way: cd /opt/ sudo add-apt-repository ppa:maxmind/ppa && apt update & sudo apt install libmaxminddb0 libmaxminddb-dev mmdb-bin git clone…
Kaneko
  • 1
  • 1