I need to free up some resources on my web proxy's server. I also have a reasonable amount of traffic of Iranians looking up porn. These guys are sucking bandwidth, but are notorious for not producing conversions. Some of the traffic is even from Iranian government facilities! I would like to block the entire Iran IP range. If I had my choice I would not block Iran like many proxy owners do, but I need to keep my proxy alive. What is the code to block the entire Iran IP range using the .htaccess file? I already have the list of IPs for the country, but it is very long.
maybe something like this order allow,deny allow from all deny from 61.0.0.0/14 deny from 61.11.0.0/17 (etc)
check out http://www.ipdeny.com IP country blocks and deny the countries you want If you are on a VPS or dedicated box, block the country IPs using iptables. If you are on a shared platform, use advice that "rednimer" posted above.
Do this, go to cpanel or whatver your using, go to "ban ip" or whatever option you have. For example, to block the United Kingom you would type in *.co.uk For australia *.com.au For america *.com And so on.
not all Ip has it's hostname counter parts with the endings for each country...put the suggested code of rednimer between the <Directory></Directory> of the particular site or on the .htaccess and it would not affect any surrounding site
I just posted a thread with everything you need to copy and paste into your HTACCESS file to ban Iranian IPs here: http://forums.digitalpoint.com/showthread.php?t=240061