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
3
votes
1 answer

Query by city name on geolite2 .mmdb file (JAVA)

I am using GeoLite2 to get Location by IP address for my java appliccation. I want to get country by city from GeoLite2-City.mmdb file. This is my reader : DatabaseReader reader = new DatabaseReader.Builder(dbFileStream).withCache(new…
sam
  • 1,073
  • 4
  • 13
  • 27
3
votes
1 answer

Error setting up geoip on Django

I'm trying to add geolocation to a website, using GeoIP. I followed the instructions on Django docs, but I get this error: ImproperlyConfigured: Error importing middleware middleware: "cannot import name GeoIP" What can be missing? I've added the…
Stephen
  • 5,959
  • 10
  • 33
  • 43
3
votes
0 answers

GeoIP module not able to fetch geo_country_code value in nginx

I am using nginx GeoIP module to get the country location of the server. The nginx -V command provide me with the list of modules installed and I am already getting --with-http_geoip_module in the list. The next step was to make changes in…
3
votes
2 answers

How to transform IP addresses into geolocation in BigQuery standard SQL?

So I have read https://cloudplatform.googleblog.com/2014/03/geoip-geolocation-with-google-bigquery.html But I was wondering if there was a #standardSQL way of doing it. So far, I have a lot of challenge converting PARSE_IP and NTH() since the…
Flair
  • 2,609
  • 1
  • 29
  • 41
3
votes
0 answers

How to set the path to geoIp in nginx

I'm trying to install Nginx GeoIP module on centos6. I'm using this guide to install it: How to install Nginx GeoIP module But I face this problem when I try to set the path of GeoIp in nginx.cof: nginx: [emerg] unknown directive "geoip_country"…
Alexander Jones
  • 103
  • 3
  • 11
3
votes
2 answers

Custom MaxmindDB (geoip2) with Private IPs

How to create a custom Maxmind database with PRIVATE IPs address. I need something like this Customizing Maxmind DB. I tried to following this Building Your Own MMDB Database for Fun and Profit . So I changed the PERL script to the following:…
Rabbit
  • 152
  • 2
  • 11
3
votes
1 answer

Cannot resolve module 'fs' in .../node_modules/geoip-lite/lib

I'm using a project with react-redux-starter-kit module, I installed geoip-lite module, and when I imported it, the errors said in the title appeared. ERROR in ./~/geoip-lite/lib/geoip.js Module not found: Error: Cannot resolve module 'fs' in…
user4383363
3
votes
2 answers

gentoo geoip installation

I try to install the geoip extension through SSH on my gentoo server. I did: emerge Geo-IP : OK pecl install geoip : OK geoiplookup www.bbc.co.uk : gives me GeoIP Country Edition: GB, United Kingdom GeoIP City Edition, Rev 1: GB, N7, Tadworth,…
yarek
  • 11,278
  • 30
  • 120
  • 219
3
votes
1 answer

How accurate is geo ip data on the U.S. state level?

We would like to implement slightly different behavior in our web application for those who visit from a certain state (Florida) vs. those in the rest of country (and world). It's not critical that it be 100% accurate but well into the 90s-- it's…
ndp
  • 21,546
  • 5
  • 36
  • 52
3
votes
3 answers

bundle geoip-c - gives error "you must have geoip c library installed"

Trying to bundle an app that has gem geoip-c but getting Gem::Ext::BuildError: ERROR: Failed to build gem native extension. /Users/durrantm/.rvm/rubies/ruby-2.1.5/bin/ruby -r ./siteconf20151116-4194-j cyop7.rb extconf.rb checking for iconv_open()…
Michael Durrant
  • 93,410
  • 97
  • 333
  • 497
3
votes
1 answer

Logstash/Kibana GeoIP not working

I am attempting to create GeoIP data using an ELK stack, which can be visualized in Kibana. I have recently installed an ELK stack (Elastic Search, Logstash, and Kibana) on a virtual instance of Ubuntu Server 14.04. I am using Bro to capture…
Archetype
  • 197
  • 3
  • 14
3
votes
4 answers

python-geoip does not work on python3.4?

I was able to get geolite2 working on python2.7 - but i needed 3.4. I found the instructions for 2.7 on this link: http://pythonhosted.org/python-geoip/. Code fragments are also provided. pip install python-geoip pip install…
user5331677
  • 409
  • 3
  • 6
  • 12
3
votes
1 answer

GeoIP function returning 0

I'm working on implementing some geoIP functionality to redirect a user away from my .com site to the relevant country domain (.fr, .es, .co.uk ...etc). I've the following in my index.php to check the users IP: ini_set('display_errors',…
Javacadabra
  • 5,578
  • 15
  • 84
  • 152
3
votes
3 answers

Maxmind Geoip city encoding issue

When configuring Max Mind with Nginx (using something like proxy_set_header GEOIP_CITY $geoip_city;), I get encoding issues with the city name when it has accents in it (like Montréal). I’ve search everywhere and I can’t find an nginx switch to…
allaire
  • 5,995
  • 3
  • 41
  • 56
3
votes
2 answers

Redirecting traffic using GeoIP and .htaccess

I'm trying to redirect web traffic from Argentina to a certain page from our website, and all the other traffic to a different page, using GeoIP and .htaccess. This is an example of what I'm trying to use (in this example, I'm using only two…
Aramis Sistek
  • 31
  • 1
  • 6