Hello, in this thread I will post the Ips that I am personally blocking, I was doing
here, but already they do not fit more characters and have updated the list I'm going to publish on pastebin.
This list includes Tor Ips, VPN, Vps etc...
The list must be in the .htaccess
List of IPS Blocked service and getIPIntel blocked by ranges
http://pastebin.com/J91Lj6ce
List of IPS Tor
http://pastebin.com/af0WxMwA
The blocking of these IPS will generate a 403 error which means? they will not have access to the web, but we can make a custom page if we want to and divert that traffic or thus blocking full access.
To direct traffic to a page customized just put in the .htaccess this rule:
ErrorDocument 403 /pagecustomized.html
Either
ErrorDocument 403 http://www.pagecustomized.com
As this code is used to block some proxies also it is counterproductive if you use Cloudflare if I am not mistaken.
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ - [F]
Similar to the 403 can take advantage and put a destination url as well
RewriteEngine on
RewriteCond %{HTTP:VIA} !^$ [OR]
RewriteCond %{HTTP:FORWARDED} !^$ [OR]
RewriteCond %{HTTP:USERAGENT_VIA} !^$ [OR]
RewriteCond %{HTTP:X_FORWARDED_FOR} !^$ [OR]
RewriteCond %{HTTP:PROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:XPROXY_CONNECTION} !^$ [OR]
RewriteCond %{HTTP:HTTP_PC_REMOTE_ADDR} !^$ [OR]
RewriteCond %{HTTP:HTTP_CLIENT_IP} !^$
RewriteRule ^(.*)$ http://www.pagecustomized.com/ [R=302,L]
I particularly also add this in the head of the template index.php on <!DOCTYPE html>
<?php if( @fsockopen( $_SERVER['REMOTE_ADDR'], 80, $errstr, $errno, 1 ) )
{
echo '<META HTTP-EQUIV="Refresh" Content="0; URL=http://www.pagecustomized.com/">';
exit;
}
?>
Other herbs:
Protecting the .htaccess
<Files ~ "^.*\.([Hh][Tt][Aa])">
order allow,deny
deny from all
satisfy all
</Files>
And the config.php
<Files config.php>
order allow,deny
deny from all
</Files>
Use it under your responsibility, if you see an IP that should not be there please advise.