Title: Block countries
Last modified: August 21, 2016

---

# Block countries

 *  Resolved [mrppp](https://wordpress.org/support/users/mrppp/)
 * (@mrppp)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/block-countries/)
 * If i want to block certain countries from accessing site using `http://incredibill.
   me/htaccess-block-country-ips` or simialr, where would i place this code in BPS?
   
   CUSTOM CODE WP-ADMIN/INCLUDES? [http://wordpress.org/plugins/bulletproof-security/](http://wordpress.org/plugins/bulletproof-security/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [icing](https://wordpress.org/support/users/icing/)
 * (@icing)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/block-countries/#post-4091296)
 * Is this advisable?
 *  Plugin Author [AITpro](https://wordpress.org/support/users/aitpro/)
 * (@aitpro)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/block-countries/#post-4091352)
 * That code would go in this Custom Code text box: **CUSTOM CODE BOTTOM HOTLINKING/
   FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE: Add miscellaneous 
   code here**, click the Save Root Custom Code button, go to the Security Modes
   page, click the Create secure.htaccess File button and activate Root Folder BulletProof
   Mode again.
 * [@icing](https://wordpress.org/support/users/icing/) – Example logic for blocking
   entire country IP addresses would be something this: if you only offer a product
   or service in a particular country and do not want visitor traffic from certain
   countries then yes it is fine to block them.
 * We have an ongoing scenario in our Forum site with Chinese spammers. Here are
   the details. We get 70-100 Chinese visitors counted by Google Analytics per month.
   Most of these Chinese visitors are probably spammers. The Forum site gets 30,000
   + unique visitors per month. Originally we were dealing with 50,000+ Chinese 
   spammers/spam commenters per month. That number is now down to 100 per month.
   Dealing with 50,000+ spam comments per month is time consuming. Dealing with 
   100 per month is insignificant.
 * So the bottom line in that scenario is how much time is it costing us to deal
   with Chinese spammers vs how much do we care about losing 100 maybe legitimate
   Chinese visitors to the Forum site. So far not a single person from China has
   complained that they were blocked from the Forum site so the assumption can be
   made that the 100 Chinese visitors are spammers.
 * This code is still experimental and the spammers are making adjustmemts and have
   found some loop holes, which we will decide what to do about blocking those loop
   holes.
 * The ideal goal is to minimize the time you spend on spammers.
 *  Thread Starter [mrppp](https://wordpress.org/support/users/mrppp/)
 * (@mrppp)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/block-countries/#post-4091356)
 * Thats my thoughts my site is aimed only at |UK so i,m not interested in chinese
   or other countries, block them less hassle.
    so still keep `# BLOCK COUNTRY BY
   IP RANGE # IncrediBILL’s HTACCESS Tools # [http://incredibill.me](http://incredibill.me)
   <Limit GET POST HEAD> order allow,deny # # Block from CHINA (CN) #`
 * with ips to deny as listed on the site all into this section of BPS
 * MUST BE
    I get 403 – Forbidden from a chinese server NICE
 *  [icing](https://wordpress.org/support/users/icing/)
 * (@icing)
 * [12 years, 7 months ago](https://wordpress.org/support/topic/block-countries/#post-4091412)
 * I often witness brute force attacks from Russian Federation, Bulgaria and Ukraine.
   They are not even my target audience. One of the days last month, they went ballistic
   on my website. In 2hrs, more than 20,000 attempts were made to crack wp-login.
   php. They were unsuccessful that day. For that, all the credit goes to [@aitpro](https://wordpress.org/support/users/aitpro/)
   and BulletProof Security. Since then, I have added further code to htaccess to
   strengthen the defence.
 * I have not yet blocked those countries using htaccess. Most of the IP addresses,
   I checked, that attacked my website are not in the list of IPs generated by [incredibill.me](http://incredibill.me/htaccess-block-country-ips)
   by selecting these three countries. So, I doubt if that will really help.

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Block countries’ is closed to new replies.

 * ![](https://ps.w.org/bulletproof-security/assets/icon-128x128.png?rev=1731938)
 * [BulletProof Security](https://wordpress.org/plugins/bulletproof-security/)
 * [Support Threads](https://wordpress.org/support/plugin/bulletproof-security/)
 * [Active Topics](https://wordpress.org/support/plugin/bulletproof-security/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/bulletproof-security/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/bulletproof-security/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [icing](https://wordpress.org/support/users/icing/)
 * Last activity: [12 years, 7 months ago](https://wordpress.org/support/topic/block-countries/#post-4091412)
 * Status: resolved