Questions tagged [geoip2]

64 questions
1
vote
1 answer

How to block a page for certain countries (geoip2) without if?

How it is possible without using if but with map in nginx with the module --with_geoip2_module (dynamic) to block all countries except the chosen and all ip except the chosen, to make it work like this: **if ($lan = yes) { set…
Kolia
  • 13
  • 1
  • 5
1
vote
0 answers

Updating geoip2 DatabaseReader in multithreaded environment

I am using a DatabaseReader object from maxmind geoip2 API. val reader = new Builder(new FileInputStream(filePath)).build. This object is already thread safe and is shared between several reader threads. It stores the relevant information using an…
Yeezus
  • 95
  • 9
1
vote
1 answer

Requirements for GIS, PointField, and Distance Calculation with Geography=True, Database question included

Referring to Django: Plugins, packages, or built-in functions. Do I need to install other plugins to use gis functions "PointField" and distance calculation queries with dwithin? Error now is either something to do with missing PointField in init…
Ober
  • 49
  • 10
1
vote
0 answers

Geolite2 alternative for city and country query?

I am using geolite2 to get location by IP address for my java application. Now I need to get city list by country and country by city name. Geolite2 doesn’t support it, is there any alternative for this?
sam
  • 1,073
  • 4
  • 13
  • 27
1
vote
1 answer

European Union Specific ISO-1366-1 Country Codes for GeoIP

With GDPR looming I put together a stupid script to block all European Union countries from accessing a site. The trouble is I couldn't find an exhaustive list of the EU country codes. There is a gist to get me started, however, there are comments…
OrderAndChaos
  • 3,547
  • 2
  • 30
  • 57
1
vote
0 answers

How to include GeoLite2 database in a java application

I'm new in Java programming so don't hold it against me. I'm trying to include a Maxmind database in my application. I've been using a relative path when working on the project, similar to: File dbfile = new File("C:\Development\Maxmind GeoIP2…
mr_j
  • 125
  • 1
  • 15
1
vote
1 answer

The file GeoLite2-Country.mmdb does not exist or is not readable

I am in a little project where I need to collect the country form people who submit a contact form to one site, now I'm using MaxMind/GeoLite2 reading the DB file with GeoIp2 v2.0 (installed from composer) and I am getting the next error…
1
vote
1 answer

Do I need user permission to know their location using their IP?

I need to use user's IP address to get their approximate location like country, state and if possibly city. Do laws require me to get user's permission to use their IP address to find their location via geoip2 ? I am not planning to use location…
user2958481
  • 587
  • 2
  • 8
  • 20
1
vote
1 answer

Maxmind DB convert ASN to IP

The Maxmind ASN Database can be used in python geoip2 to convert IP to ASN and ASN name. Similarly, how to get IP range(s) from AS number?
Karthik
  • 363
  • 2
  • 7
  • 20
1
vote
1 answer

How To change Links By GeoIP with angularjs?

in my page there is a button and i want to put some links depend on the user country. i put this code in angular for example to understand my point. this code not work for me. did i missed something?
kingmaster
  • 25
  • 9
1
vote
1 answer

homestead install GeoIp2 NGINX module errors

I need to install the https://github.com/leev/ngx_http_geoip2_module on my Homestead. When I recompile nginx in my after.sh first I got an error that the module is not binary compatible, I read that I have to do ./configure with all the original…
Madsem
  • 11
  • 1
  • 3
1
vote
0 answers

slim 2 GeoIP2 maxmind

I am working on a API Slim 2 project and I'd like to integrate MaxMind's GeoIP2. I have used composer to install dependencies however it seems I cannot run a GeoIP country lookup for the existing IP entries from the mysql database. If I run script…
1
vote
1 answer

How to use MaxMind's GeoIp2 in PHP with another autoloader?

I got installed MaxMind's GeoIp2 => https://github.com/maxmind/MaxMind-DB-Reader-php Also php extension https://github.com/maxmind/libmaxminddb for faster lookup Everything works just fine when i am using it like this: require_once…
Oleg Popov
  • 2,464
  • 1
  • 17
  • 15
0
votes
0 answers

How to create GEO-IP database configmap for NGINX ingress controller?

I have a set of IP addresses (Private IPs). I want to create a custom geo-ip database. How can this be done? For example: 10.0.0.0/16 - Asia Region 10.0.1.0/16 - Aus Region
Container-Man
  • 434
  • 1
  • 6
  • 17
0
votes
0 answers

Why am I getting AttributeError: module 'geoip2' has no attribute 'databse'

This is the code that I was executing and this is even the example that was given in the documentation of the geoip2 made by maxmind can anyone tell me what was the problem import geoip2.database with…
MadNit
  • 13
  • 2