Block countries through .htaccess

Johannes Beus
Johannes Beus
Johannes Beus ist Gründer und Geschäftsführer von SISTRIX.

Sadly, for some countries, the ratio of wanted to unwanted traffic is so bad, that you decide on blocking all traffic from that specific country. To make things easier we are offering prefromatted .htaccess-files in which the IP-networks of the countries are already filled in. Naturally, these file are not 100% correct but they fulfill their purpose. To keep out the evil capitalists from overseas you can use this .htaccess, for the a-bomb-pal from Tehran you would use this one. An overview of all the possibilities can be found here.

Please keep in mind that, especially for extensive lists like the one for the USA, the performance of the webserver can suffer significantly. While we could reach a throughput of 4616 pages per second without .accesses, the server was only able to process 15 accesses per second when the list was in use. For smaller lists the performance will not be affected that strongly and can partially not even be measured anymore. If we use our development-server to block the country of open proxies (Korea) , 2319 accesses/minute are still possible. This would be negligible when you are working with pages that are generated dynamically through PHP or other scripting-lanugages.

Related posts
Comments
Comments will be closed 30 days after the post was published.