How to block IP address from Russia and China
As a mentor of website it is tough job to make it safe and having a content that satisfied audience from all over the world is a hard job to be complete.
Preserve from what does that mean? And having satisfied content? What to do to overcome from these issues?
Some time you have a content on that not relevant and having objection and serious sort of protest that is harmful for your website in a sense you got bad comments and that community or audience report your website so you have to make that country or region in block list to protect your website.
May be your site is specific for a book shop or a hotel or a company for locals of your country so you want to safe your site from extra traffic that will slow down your site, to prevent your site from getting slower and saving your bandwidth you have to allow access to your locals and block other countries.
And you have to save your site form hackers like Russian and China’s hackers so by
Blocking china and Russia you have chance to take your site out of their sight. Otherwise you are going to face a lot of problems.
HOW TO BLOCK COUNTRIES?
The best and common way to block a Country or countries is to use .htaccess. Because we can do that by our self without installing and creating mess with firewall’s rules.
.htaccess is a file used on a server that is using Apache Web Server software. When this file placed in directory it detected by Apache server and perform task.
Ways to use that file:
IP2Location tells geo location IP solution to help us to identify the audience geographical location for instance tells the country, region, city, time, zip code, country code and their IP address .There they allow us to blocked IP’s or countries or allowed all the IP address/Countries. To create the list you have to select the IPV4 and then select the country if you want to select more than one country you have to sign up for free account is will allow you to select approx. 30 countries after that select Apache.htaccess deny from the menu. Then you have to download the file by clicking the download button in the bottom. Now rename this file to .htaccess and upload to your directory home page directory
To generate a allow list you have to select Apache 2.4 .htaccess allowfrom the drop down menu. As shown below:
After selecting click download button. And place in directory as htaccess.
Visit IP2Location.
- Country IP Blocks:
Country IP blocks works same as IP2Location provide geo location and IP address and provide us right to generate allow and deny list from specific countries. To create the list select the country and from options
For allow list u just have to select .htaccess Allow list and after selecting the option and countries just have to click the Create ACL button and instantly acl code will be generated place that code in .htaccess file and upload you selected country will be blocked or allowed.
