Questions tagged [geoip]
The geoip tag has no usage guidance.
86
questions
22
votes
9
answers
42k
views
Relatively easy way to block all traffic from a specific country?
I have a web app that has no users in the Philippines, but is constantly bombarded by spammers, carders testing cards, and other undesirable activity from there. I can see in the logs that they have ...
13
votes
3
answers
10k
views
Best way to block a country by IP address?
I have a website that needs to block a particular country based on IP address. I am more than aware that IP-based blocking is not a foolproof method for blocking visitors, but it is a necessary step ...
12
votes
2
answers
17k
views
GeoIP for configuration into nginx
I'm trying to compile geoip into nginx. When doing ./configure --with-http_geoip_module I get the following error.
./configure: error: the GeoIP module requires the GeoIP library.
You can either do ...
8
votes
2
answers
24k
views
Installing GeoIP on CentOS
On CentOS 6 I cannot install GeoIP even though many websites describe installing GeoIP with the following commands:
yum install GeoIP GeoIP-devel GeoIP-data
I get No package GeoIP available.
6
votes
3
answers
17k
views
unknown directive "geoip_country" on nginx/1.10.1
I have a nginx/1.10.1 on my CentOS 7 installed via nginx repo. I just install geoip module
[root@www nginx]# nginx -V
nginx version: nginx/1.10.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC)
...
4
votes
4
answers
5k
views
Nginx and GeoLite2 not working
Is Nginx official ngx_mod_http_geoip compatible with GeoLite2 databases ? I can't get them working, so I assume they are not compatible ?
4
votes
2
answers
8k
views
Nginx geoipblocking & allowing LAN IPs
I'd like to block IPs with geoip except whitelisted countries AND the local area network.
The first part works flawless, the second one not.
Somwehere searching the internet I found the codes LH (...
4
votes
3
answers
5k
views
Geo-blocking in Azure
Is there any functionality available in azure out of the box to block access to a website or server from specific countries? In a larger project that I'm involved with, we have an Imperva WAF and ...
3
votes
5
answers
2k
views
Block all communication from a list of IP addresses
Is there any firewall(preferred some free :) ) that can block all communication from all ip addresses except from some IP's coming from a particular location...
i basically want to block DDOS attack ...
3
votes
1
answer
2k
views
Installing GeoIP on Amazon EC2 Linux
I am trying to install GeoIP module to block country specific traffic to my website. My Website is LAMP configured and hosted on Amazon AWS EC2 instance.
As per some article on google, I followed ...
3
votes
2
answers
11k
views
Haproxy not properly passing on X-Forwarded-For header
I have backend web servers that receive requests by way of haproxy->nginx->fastcgi. The web app used to see multiple ip's coming through in the X-Forwarded-For header, chained together with commas (...
3
votes
1
answer
843
views
DNS setup for website on geo redundant servers
Let's say:
I have a website written in English and shown on www.example.com.
The website is on a US server now (based on cPanel/WHM) at the IP address 192.0.2.0.
I can manage the DNS of example.com ...
3
votes
2
answers
2k
views
NginX GeoIP cause extra load?
Because Nginx requires the geoip_ directives to go into the main http{ } block of the nginx.conf file, does that mean the geoip data is being pulled for every single request?
In other words, does ...
3
votes
0
answers
1k
views
GeoIP vs IPset performance in iptables
I would like to ask you what is faster in term of performance GeoIP or IPset.
Let me explain, imagine that I have rule:
iptables -A INPUT -m geoip ! --src-cc US,UK,CA -j DROP
And imagine that I ...
3
votes
0
answers
3k
views
Apache 2.4, mod_geoip GeoIPScanProxyHeaders "On" not working
apache httpd.conf
LoadModule geoip_module modules/mod_geoip.so
<IfModule mod_geoip.c>
GeoIPEnable On
GeoIPEnableUTF8 On
GeoIPOutput Env
GeoIPScanProxyHeaders On
GeoIPDBFile /...
2
votes
1
answer
5k
views
GEOIP redirect with https
server{
listen 80;
listen [::]:80;
server_name 111.111.111.111 example.com www.example.com;
return 301 https://example.com$request_uri;
}
I have not installed any extra NGINX ...
2
votes
1
answer
1k
views
Geo fencing, ip address list of different geographies
I need to provide different webpage experiences based on geographies divided as Western, Asian, African audience etc.
I plan to do this with Nginx geo module by segmenting ip addresses and routing ...
2
votes
3
answers
3k
views
Nginx HttpGeoIPModule with X_Forwarded and HAProxy
Is it possible to make Nginx HttpGeoIPModule use the X_Forwarded IP that is sent via HAProxy? It is currently just using the incorrect server IP, but unsure how I can make Nginx use the X_Forwarded IP....
2
votes
1
answer
4k
views
GeoIP: Redirect all but specific countries
I am using Apache's GeoIP module and a MaxMind database to determine the country of a visitor based on their IP address and redirecting them to a country sub-folder as shown below:
RewriteCond %{ENV:...
2
votes
1
answer
5k
views
How can I install the ngx_http_geoip2_module module ? on Centos
I installed the GeoIP package using yum. I got the geoIP files in the /usr/share/GeoIP/ folder. I need to add some rules on some countries in the: /etc/nginx/nginx.conf and to do that i need to load ...
2
votes
1
answer
2k
views
GeoIP PHP extension not working on CentOS 7
I can't get the GeoIP PHP extension working on CentOS 7 and PHP 5.5.21.
I first started with yum install php-pecl-geoip and restarted httpd. I then did a simple test:
$record = geoip_record_by_name(...
2
votes
1
answer
4k
views
MaxMind GeoIP CSV to .dat
I need to put local IP addresses into MaxMind GeoIP DB.
I've downloaded the CSV and adding new IP addresses and locations is easy.
I've found two tools that do csv to dat for MaxMind GeoIP but I can't ...
2
votes
3
answers
2k
views
GeoIP based greylisting with Exim?
I have been using Sendmail together with milter-greylist for many years at several sites.
milter-greylist has support for defining greylisting rules based on GeoIP database lookups. This is very ...
2
votes
0
answers
4k
views
Nginx: How to determine if a module is installed
Im using nginx as load balancer in a dockerized setup.
Im trying to get the http_geoip_module up and running so I can redirect traffic based on users geographical position.
Question:
The command ...
2
votes
1
answer
984
views
open source geolocation aware authoritative DNS server with edns-client-subnet support
geoip-enabled authoritative dns server is quite easy to find - bind9 with patch can do it, powerdns as well. but the problem starts when server receives DNS query from global public resolvers like ...
2
votes
0
answers
347
views
php5-geoip performance issue
I installed the php5-geoip module on Ubuntu 10.04 via apt-get install php5-geoip. I've updated the geocities.dat library
The production server performance decreased and load average is soaring. ...
1
vote
3
answers
5k
views
nginx GEOIP behind cloudflare proxy showing wrong country (not of end user, but if proxy)
I am using Cloudflare and nginx geoip directives:
geoip_country /usr/local/share/GeoIP/GeoIP.dat;
geoip_city /usr/local/share/GeoIP/GeoLiteCity.dat;
They are picking the IP up OK (as pipaddress ...
1
vote
2
answers
3k
views
One hostname and two servers in different countries
I have a site, let it be www.site.com/ (ASP NET MVC, but that's doesn't really matter) I have another site, let it be www.secondsite.vi/ (it hosts in Vietnam). The structure of the sites is the same, ...
1
vote
2
answers
1k
views
IP addresses for Windows Azure servers seem to be from the US, when the servers are supposed to be located in Europe
I have a couple of test servers on Windows Azure. One is in the North Europe location and the other is in West Europe. I yet to get around to testing which location offers better connection speeds ...
1
vote
2
answers
1k
views
How often do country IP address ranges change?
How often do country IP address ranges change?
I get a lot of notifications about failed login via Wordpress or SSH. It's very hard to ban every single IP address, so I wrote a script to block single ...
1
vote
1
answer
3k
views
Cannot set GeoIP rules in iptables
I try to add this rule:
iptables -A INPUT -m geoip ! --src-cc CZ,SK -j DROP
I set GeoIP support according to this answer: Ubuntu IPTables allow only allow 1 country | Super User
But it doesn't work,...
1
vote
1
answer
3k
views
Nginx proxy_set_header not working to Apache GEOIP
I'm using Nginx reverse proxy to apache2 using following tutorial.
Then i try to install geoip to Nginx using this tutorial
The reverse proxy works flawlessly for a while now, until I tried to ...
1
vote
1
answer
2k
views
Unable to configure MaxMindDB's Apache module
I recently installed MaxMind's MaxMindDB apache module successfully.
I added a new file called geoip.conf to /etc/httpd/conf.d/ with the following contents:
<IfModule mod_maxminddb.c>
...
1
vote
1
answer
86
views
Geographical data per ip command line tool
Is there any (preferably FOSS) command line tool that provides geographical information per requested IP?
Online example
1
vote
1
answer
2k
views
Nginx : How to do dynamic path routing requests to single root directory with different country (geoip module)
How to do dynamic path routing requests to single root directory and url to /<country_zone>/<actual_url>/* .
I am able to retrive $country_zone value which can be any of (in|uk|us|...
1
vote
1
answer
2k
views
How to add ngx_http_geoip2_module support to Nginx [closed]
geoip is one of the must-have module for Nginx, in the latest Nginx package i couldn't find geoip2 support. It is showing a few dependency errors.
1
vote
2
answers
1k
views
How to use Env in mod_substitute?
Okay, I'm not very strong at htaccess. I have a code:
SetEnvIf GEOIP_COUNTRY_CODE US LinkC example1
AddOutputFilterByType SUBSTITUTE text/html
Substitute s/example2/env=LinkC/ni
I'm trying to ...
1
vote
1
answer
1k
views
Dynamic IP on NGINX geo module without restart
I want create a task on my Capistrano deploy to put my public IP on geo module configuration of my NGINX server without restart NGINX, is it possible?
Example, my /etc/nginx/nginx.conf:
geo $geo {
...
1
vote
1
answer
4k
views
GeoIP and Nginx
I have a nginx with geoip, but it is not working rightly. The issue is the next:
Nginx are getting geodata from $_SERVER['REMOTE_ADDR'] instead of $_SERVER['HTTP_X_HAPROXY_IP'], which have the real ...
1
vote
2
answers
836
views
varnish3, mod_geoip with apache2 using mod_rewrite and mod_rpaf
I am maintaining a website with 3 different versions of the site, with 3 different languages, handles with a single system written in php, which takes in environment variables based on the domain name ...
1
vote
0
answers
368
views
Debian 11 - Crowdsec - geoip-enrich ignored
I installed crowdsec on a Debian 11 (and 12) machine and it works but the geoip localization.
If I do:
# cscli collections list
INFO[19-09-2021 10:16:20 AM] Ignoring file /etc/crowdsec/parsers/...
1
vote
1
answer
385
views
bind9 geoip does not function correctly
bind9 bind-9.17.2 has been compiled from source on debian-9.
./named -V
BIND 9.17.2 (Development Release) <id:6d46544>
running on Linux x86_64 4.9.0-6-amd64 #1 SMP Debian 4.9.88-1+deb9u1 (2018-...
1
vote
0
answers
2k
views
How to troubleshoot GeoIP error: error opening file /usr/share/GeoIP/GeoIP.mmdb
I am new to the GeoIP solution.
Some things have changed regarding legacy GeoIP dbs which has made it seem a little more complicated.
I am on AWS Linux
I have installed GeoIP:
rpm -qa |grep GeoIP
...
1
vote
0
answers
845
views
Nginx 301 redirect of bad requests
I've found those requests in my access.log of nginx:
X.X.X.X - - [03/Apr/2017:20:52:31 +0200] "GET //phpMyAdmin/scripts/setup.php HTTP/1.1" 301 184 "-" "-"
X.X.X.X - - [03/Apr/2017:20:52:31 +0200] "...
1
vote
0
answers
545
views
NginX with GeoIP - what is returned for geo code when no mapping is found?
As the tests I conducted (using Java API to read GeoIP.dat, as well as local test) might be insufficient, I was wondering what happens on NginX when geo-ip module is configured, and when no IP to ...
1
vote
1
answer
3k
views
nginx geoip redirect for first time only leads to redirect loop
I'm trying to configure nginx to perform geoIP checks on first-time visitors only.
The idea is that first-time visitors should be redirected to the page version which has been customised for their ...
1
vote
3
answers
264
views
Arvixe claims that my physical host is located in Europe eventhough the whois information
When I look whois of the site it seems like located in US.
My site is: www.evdore.com.
1 * * *
2 hos-tr1.juniper1.rz13.hetzner.de 213.239.224.1 de 0.145 ms
hos-tr4....
1
vote
1
answer
961
views
Nginx Location Rewrite Rule matching GeoIP Header value
I'm looking to write a simple rewrite rule where I basically am trying to say the following
If the requested URI is text/index.html (or test/) and the GeoIP Organization equals "My GeoIP Value" then ...
0
votes
4
answers
823
views
IP address and geolocation
I very well know that this has been asked quite a number of times here itself but folks please give this question a read. Plus I'm giving my best to phrase this question, hence the Prelude/Question ...
0
votes
2
answers
4k
views
Anyway to backup nginx before recompiling?
I am looking to install the HttpGeoipModule for NGINX but learning I have to recompile the entire thing from source in order to do so. I have a new Media Temple DV 4.0 server and that comes with nginx ...