The bottom line is this, do not use .htaccess or Apache config or any other web server ACL to try and block countries.It may be fine for a handful of IPs, but these files are read on every request and are not cached; it will hurt you eventually. Most hosting companies provide servers in such a way as to make this a feature they cannot offer.Just because an IP is from China, it doesn’t mean blocking that IP will do a lick of good in the long run.Web admins will rarely block an IP simply because that IP did naughty things once.So, you should not expect significant traffic from them as a matter of course.If you have a local bookstore and your primary market is local people walking into your store, then there is no need to let any other countries index or waste bandwidth on your server.
I also happen to know that 99% of all brute force user password hack attempts are from Chinese IP addresses.
But when I know that 99% of it is bogus, bots, brute force hacks, vulnerability scanners, and web crawlers, then why wouldn’t I just block China from accessing my site?
There are some reasons against blocking access to countries too. Even though they cater only to local people who walk in the door for a stay, foreigners traveling to the area will be searching for hotels before they get there.
If we consider that the entire userâ€™s data is under /home, I need to have a list of all the subfolders sorted by the size of the subfolders.
This can be achieved in many was on Linux, and for example if you have quota enabled it can be as easy as checking the quota list.