httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Cicimov <icici...@gmail.com>
Subject RE: [users@httpd] Use Allow from IP when there is a proxy exist?
Date Fri, 08 Aug 2014 08:23:40 GMT
> Your .htaccess file:
> # ALLOW USER BY IP
> order deny,allow
> deny from all
> SetEnvIF X-Forwarded-For "1.2.3.4" AllowIP
> SetEnvIF X-Forwarded-For "5.6.7.8" AllowIP
> Allow from env=AllowIP
> allow from 1.2.3.4
> allow from 5.6.7.8source:
http://frustratedtech.com/post/42641261089/htaccess-file-to-block-ips-coming-from-varnish
>
Looks sane to me although don't see the need for the last 2 allow since
they are already included by the previous "Allow from env=AllowIP". You can
also use regexp like:

SetEnvIF X-Forwarded-For "1.2.3.4|5.6.7.8|7.8.9.[2-5]|3.4.5.[69]" AllowIP

just as example.

Mime
View raw message