Questions tagged [geoip]

GeoIP is the process of analyzing an IP address and determining the geographical location of that end point.

GeoIP assigns a location to an IP address, generally by doing a lookup in a specifically created database. Popular providers are MaxMind, Google, InfoSniper, and IP2Location. These, in turn, are based on Regional Internet Registries (RIR).

Common uses for this location information include:

  • Selecting the closest mirror for a download
  • Providing region specific billing information (currency, shipping cost)
  • Regionalizing the content of a page (local deals or specials)
694 questions
2
votes
1 answer

Install GeoIP Nginx module - Debian

I'm seeking your help to install the Nginx GeoIP module, and all its dependencies. Actually, i tried a lot if things to build Nginx with it, but failed each time on same error. My config: Debian 8.2, Nginx 1.9.7-1~jessie (last mainline), PHP7…
Mtxz
  • 3,749
  • 15
  • 29
2
votes
0 answers

Logstash geoip not working for me

I am trying to use elasticsearch and logstash and get the geoip location filter. I have some log file for which grok filter is working but geoip filter not working. My conf file is input { stdin { } } filter { grok { …
2
votes
2 answers

Using django GeoIP and MaxMind database

I'm trying to setup geoip in Django to identify the source of a connection (to tailor content for different countries) but running into a problem. First I execute: from django.contrib.gis import geoip geo = geoip.GeoIP('path to maxmind db') Then…
ptav
  • 171
  • 1
  • 11
2
votes
0 answers

Nginx Opcache (fastcgi_cache_key) and GeoIP

I've searched Google / this forum for this but can't find anything relevant so apologies in advance if this has been covered elsewhere. I've enabled Opcache on my server and have GeoIP enabled. The default fastcgi_cache_key directive…
2
votes
1 answer

Best way of using GeoIP databases

Can anyone please let me know what's the best way of using the GeoIP databases in order to detect the country of visitors by IP. I used to have a table populated with IPv4 information ( longstart, longend, country code ) and with an INET_ATON()…
Lia
  • 31
  • 4
2
votes
1 answer

Laravel stevebauman/location returning wrong data

Using: Larvel 4.2 Location package from https://github.com/stevebauman/location I am developing an app locally with the details above but when using the package the data I get back isn't correct. I have tested this in two ways, first with…
Levi Cole
  • 3,561
  • 1
  • 21
  • 36
2
votes
0 answers

How to use the geoip database in elasticsearch?

I would like to access the geolite database of maxmind from my java/scala code. http://www.maxmind.com/en/geolite I have in my mind a solution that is scalable like elasticsearch and that has no single point of failure, no bottle neck, low latency…
Eduardo
  • 135
  • 1
  • 7
2
votes
1 answer

Should I save GeoIP data

I'm currently working on a project in which I will use geolocation data, base on GeoIP. This data will be quite important for us, so I want to ask you whether it makes sense to save the exact geolocation data for IP each to database immediately, or…
mpuhacz
  • 53
  • 3
2
votes
1 answer

Redirecting viewers to other site based on country geoip

let's say I have a website (www.abc.com/featured/abc) and wanted to redirecting (only that link) the viewer from other country except Malaysia to youtube video.. But www.abc.com is still worldwide. And yes, my server is already compiling with geoip…
Amirol Ahmad
  • 532
  • 5
  • 21
2
votes
2 answers

What is the database for GeoIP.h

In one open source project, I saw that they were including GeoIP.h header file and calling their functions to know the country code of an IP. I wonder where is the database used by GeoIP.h I went through the source code of GeoIP.h…
Charanjeet Kaur
  • 1,199
  • 3
  • 14
  • 27
2
votes
2 answers

GeoIP + Django, Invalid GeoIP city data file

This seemingly has no fix, I've read up on the previous bug which was apparently fixed 5 years ago here. Basically I've done everything completely properly according to the documents in both Django and at MaxMind. I have specified my GEOIP_PATH,…
redband
  • 287
  • 1
  • 16
2
votes
0 answers

pygeoip vs django.contrib.gis.geoip

I'm building a django powered website and need access to the (rough) location of my users and i soon found the free databases from MaxiMind. But i found two ways of accessing them https://docs.djangoproject.com/en/dev/ref/contrib/gis/geoip/ and…
SverkerSbrg
  • 503
  • 1
  • 9
  • 23
2
votes
1 answer

Java and GeoLite database: How to use GeoLiteCity.dat in a production way?

I downloaded GeoLite City database and I am able to access the database with Java to get the corresponding location information of an IP address in the following way: File file = new File("C:\\GeoLiteCity.dat"); LookupService lookup = new…
curious1
  • 14,155
  • 37
  • 130
  • 231
2
votes
2 answers

How to inject $_SERVER variable into a Service

a service of my application needs to access a $_SERVER variable (which is provided by apache) called: $_SERVER['GEOIP_COUNTRY_CODE']; What are good ways to achieve this? My current guess would be to inject the RequestStack but on the other hand I…
gries
  • 1,135
  • 6
  • 29
2
votes
1 answer

GeoIP in localhost

I am using GeoIP to get country from client address but it returns null ip = (req.headers['x-forwarded-for'] || '').split(',')[0] || req.connection.remoteAddress; country = geoip.lookup(ip).country; I think this is because I am using localhost…
Vinz243
  • 9,654
  • 10
  • 42
  • 86