Questions tagged [geoip]
The geoip tag has no usage guidance.
84
questions
0
votes
1
answer
66
views
Apache geoip not work: PHP Fatal error: Uncaught Error: Undefined constant "HTTP_X_FORWARDED_FOR"
testgeoip.php
<html>
<head>
<title>What is my IP address - determine or retrieve my IP address</title>
</head>
<body>
<?php
if (getenv('HTTP_X_FORWARDED_FOR')) { ...
0
votes
0
answers
29
views
GeoIP-specifing nginx redirect for multiple servers
I need redirection based on country code I get from GeoIP (ngx_http_geoip2_module), but as I see, I can't use map because I need different conditions and destination URLs for different server ...
0
votes
1
answer
513
views
Setting up GeoIP to work with Nginx on Debian 11
I am trying to set up Nginx v. 1.24.0 and GeoIPupdate to work so that users not from a specific country do not get access to the web server.
However, as I'm following every guide I see that it is ...
0
votes
0
answers
46
views
What's the recommended way to use GeoIP2 with a varying mirror list?
I want to setup a webserver, where every HTTP request is directly redirected to a nearby mirror. So far we used the unfortunately no longer supported Perl module Apache2::Geo::IP together with Apache'...
0
votes
3
answers
216
views
Unable to Set Custom Error Page 403 for GeoIP
Please need your help. Unable to display the custom error 403 page for geoip restriction. It is always showing default error page 403 Forbidden.
Here are my Configurations.
/etc/nginx/nginx.conf
...
0
votes
1
answer
212
views
xt_geoip not blocking connections?
I have xt_geoip configured to block connections from various countries, but it appears that connections are still being allowed from those countries.
From my /etc/iptables/rules.v4 (reduced a little):
...
1
vote
0
answers
354
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/...
0
votes
1
answer
847
views
nginx TCP forwarding with GeoIP
CentOS 7.8
nginx version: nginx/1.18.0
yum install nginx-module-geoip
yum install GeoIP GeoIP-data
Then, GeoIO runs well with HTTP(S).
I need nginx to forward a TCP port, which is only open to CN
add ...
0
votes
0
answers
361
views
Nginx: implementing country block with a map
I am trying to implement, on a nginx webserver, a country block with a map.
This is my server configuration:
include snippets/ban-country-codes.conf;
include snippets/ban-user-agent.conf;
server {
...
1
vote
2
answers
961
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 ...
0
votes
1
answer
171
views
Does CDN defeat the purpose of server-level GeoIP blocking?
Looking for second opinions.
Suppose a website is set up so that only IPs from country X are allowed read/write access. This server goes through a CDN such as Cloudflare. Because the GeoIP block is at ...
1
vote
1
answer
364
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-...
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 ...
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
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|...
0
votes
1
answer
1k
views
Iptables is not matching the chain with xtables-addons GeoIP
I have a strange issue with xtables-addons, in particular with xt_geoip module.
I'm using Ubuntu 18.04.3 LTS x64 4.15.0-1051 with all the packages updated,
I installed the following packages: ...
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.
0
votes
1
answer
5k
views
Unable to locate package Nginx-module-GeoIP
I am working on Debian Jessie 9. I have installed Nginx but there is no GeoIP module.
so I decided to install it but "apt-get install nginx-module-geoip" not working giving an error like E: Unable to ...
0
votes
0
answers
351
views
nginx: Block specific PHP file from most countries
Background: I run several WordPress sites and I notice a huge amount of distributed brute force login attempts. fail2ban does not help me here because the attacker carefully attempts only up to 5 ...
3
votes
1
answer
1k
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 ...
0
votes
1
answer
272
views
GeoIP Split DNS Wrong 3rd View on Slave
Successfully configured Bind to host multiple views with TSIG with this guide. Problem is when I add a third view to the mix, things get weird.
On each server, I have 3 views right now:
USA
Europe
...
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 ...
0
votes
1
answer
3k
views
GeoIP Apache Mod Whitelist by Country and Local Network
I've been having issues with attempted hackers trying to break into my web server so I decided to block traffic from everywhere except my target countries: US, France, and Germany. I installed the ...
0
votes
1
answer
2k
views
Is there any limitations in using GeoIP with bind9
I have a DNS server (BIND 9.10.3-P4-Ubuntu) on an Ubuntu 16.04 machine. I have a domain with two A records (IP1,IP2) which indicates to two separate web servers (Wserver1, Wserver2). I want the DNS ...
0
votes
1
answer
184
views
Why GCP Kubernetes Node host location for europe-north1 seems to be in US?
I am new to both Google Cloud Platform and K8s. I have launched Kubernetes cluster in GCP and chosen europe-north1 as the region (europe-north1-a as the zone).
When I try to run my application on ...
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 ...
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,...
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:...
0
votes
1
answer
495
views
NGINX, GeoIP, Varnish : Too many Redirects
I own two servers. One in Singapore (data.example.me) and other one in Europe (eu.data.example.me).
I want the website to serve the users from their closest server when they visit my website.
I ...
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 ?
0
votes
1
answer
2k
views
What this is parameter in the geo block in Nginx?
In nginx, in geo module it has the following example
http://nginx.org/en/docs/http/ngx_http_geo_module.html
I am wondering what is this 0,2,1,1 numbers etc.. stated after the main addresses (values). ...
1
vote
0
answers
839
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] "...
0
votes
1
answer
5k
views
GEOIP for IIS 10
I'm migrating from Apache 2.4 back to IIS 10. IIS does have a IP restriction interface but there is noway to GEO ban by country.
Is there a similar module than Apache Maxmind Geo IP module for IIS? ...
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 ...
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 ...
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(...
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 ...
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)
...
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
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 ...
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 /...
0
votes
2
answers
1k
views
"Nmap Scripting Engine" HTTP Requests
I looked into my nginx access logs to check who accessed my server and I noticed this line:
<IP> - - [25/Feb/2016:02:49:12 +0100] "GET / HTTP/1.1" 302 160 "-" "Mozilla/5.0 (compatible; Nmap ...
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 ...
0
votes
1
answer
994
views
How to test GeoIP .dat librairie in local
I'm on a projet where I have to implement GeoIP on a Redhat Apache instance. For now, i'm only testing the configuration in local. Here it is :
<IfModule mod_geoip.c>
GeoIPEnable On
...
1
vote
0
answers
535
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 ...
0
votes
2
answers
14k
views
How should I add GeoIP module to nginx?
I'm using nginx version 1.8 on a centos 6.7 server but when using nginx -V command , I can't see geoip_module there . How can I add it to nginx ?
0
votes
0
answers
639
views
GeoIP module (mod_geoip2) and Amazon EC2 Ubuntu instance
I have installed GeoIP mod via http://dev.maxmind.com/geoip/legacy/mod_geoip2/ and have made sure the permissions are correct for www-data to read the database. We are just needing to block a ...
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 ...
0
votes
1
answer
239
views
Varnish GeoIP (vmod_geoip) + Amazon Linux
I'm trying to install vmod_geoip via amazon linux, but so far no luck.
I've installed geoip geoip-devel. I've downloaded the vmod_geoip source. I'm able to ./autogen.sh but ./configure constantly ...
1
vote
3
answers
262
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....