bbr18
13/12/2013, 21h48
D'après les docs de maxmind les autorisations/refus doivent être dans le bloc location et non dans le bloc module
SetEnvIf GEOIP_COUNTRY_CODE FR AllowCountry SetEnvIf GEOIP_COUNTRY_CODE BE AllowCountry SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry Order Deny,Allow Deny from All Allow from env=AllowCountry Allow from 12.34.56.78
bbr18 :
ça marche actuellement ? Les pays à autoriser ou exclure sont dans location pas dans module en principe.
Je n'ai pas essayé mais si tu ajoutes une autre condition en rapport avec l'IP (GEOIP_ADDR) ?
::1 - - [13/Dec/2013:21:25:01 +0100] "GET / HTTP/1.1" 403 - "-" "Mozilla/5.0 (ISPConfig monitor)" ::1 - - [13/Dec/2013:21:25:02 +0100] "GET / HTTP/1.0" 403 - "-" "Wget/1.12 (linux-gnu)" ::1 - - [13/Dec/2013:21:30:01 +0100] "GET / HTTP/1.1" 403 - "-" "Mozilla/5.0 (ISPConfig monitor)" ::1 - - [13/Dec/2013:21:30:02 +0100] "GET / HTTP/1.0" 403 - "-" "Wget/1.12 (linux-gnu)" ::1 - - [13/Dec/2013:21:35:01 +0100] "GET / HTTP/1.1" 403 - "-" "Mozilla/5.0 (ISPConfig monitor)" ::1 - - [13/Dec/2013:21:35:02 +0100] "GET / HTTP/1.0" 403 - "-" "Wget/1.12 (linux-gnu)"
Me. B :
Le plus simple est de créer un second virtual host avec un sous domaine dessus par exemple sur le meme root et ou seul ton IP est autorisé ;-)
gurki :
Pour une seule adresse IP, pas besoin d'utiliser GeoIP ! Un simple "allow from xxx.xxx.xxx.xxx" couplé à un "Satisfy any" fera l'affaire...
Ne voulant que les visiteurs de France, Belgique et d'Allemagne
- GeoIPEnable On GeoIPOutput All GeoIPDBFile /usr/share/GeoIP/GeoIP.dat SetEnvIf GEOIP_COUNTRY_CODE FR AllowCountry SetEnvIf GEOIP_COUNTRY_CODE BE AllowCountry SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry SetEnvIf GEOIP_ADDR ton_ip AllowIP Deny from all Allow from env=AllowCountry Allow from env=AllowIP
GeoIPEnable On GeoIPDBFile /usr/share/GeoIP/GeoIP.dat SetEnvIf GEOIP_COUNTRY_CODE FR AllowCountry SetEnvIf GEOIP_COUNTRY_CODE BE AllowCountry SetEnvIf GEOIP_COUNTRY_CODE DE AllowCountry Deny from all Allow from env=AllowCountry