If you are an admin of a website and you see a lot of bogus traffic coming from some countries which give no profit to you, and you want to block those countries from accessing your website then you can use the bash script given below. There are two ways to block countries. First is to configure your Apache server and second is to set iptables commands. We will do this using iptables. First of all