Support » Plugin: Wordfence Security - Firewall & Malware Scan » Can I block IPs by country code?

  • Hi there! Is there an easy and effective way to block the entire country of Ukraine in Wordfence?

    I don’t want to block tons and tons of IPs line by line. I’m trying to figure out if I can do it by country code. If so how?

    I’m not a paid member (yet) if it matters.

    • This topic was modified 2 years, 10 months ago by  Ronnie55.
Viewing 1 replies (of 1 total)
  • It’s indeed advisable to block Ukraine unless you need traffic from that specific country, in my experience, anyway, as a pro blogger. In my case, the ratio of real legit people browsing from Ukraine, to bots and criminals coming from Ukraine, is about 2/2000. The situation is ridiculous.

    I’m mystified as to why our government doesn’t do more to defend us citizens from criminal attacks coming from this country, but then, that’s another issue…

    Best way to block countries is probably to purchase Premium Wordfence and use country blocking. Premium WF is way worth the money, IMHO. Using Wordfence for country blocking is simple, and eliminates installing and maintaining yet another plugin (groan).

    In any case, you can’t really directly block countries using a country code, it has to be done using IP numbers, based on databases that provide lists of IP numbers for each country.

    When you use these sorts of “country blocking” systems they may have a front end with country codes, but those codes are at some point used to reference the IP number database.

    If you don’t want to purchase Wordfence, plugin IQ Block Country does work with Wordfence. IQ block is better in that it allows blocking of admin side or public side, while Wordfence simply blocks everything. On the other hand Wordfence has a very handy feature that allows you to provide people with a “secret” URL that bypasses the country blocking.

    If you care to spend lots of time and slow down your website with a huge .htaccess file, you can also block Ukraine in your .htaccess file by pasting in a long list of IP ranges.

    https://www.ip2location.com/blockvisitorsbycountry.aspx

    Also remember that your hosting back end (FTP, etc) is also being attacked constantly. You can sometimes get your ISP to block a country at the basic level, thus blocking attacks on your FTP, and everything else.

    When you block using Wordfence, all you end up blocking is access to WordPress.

    MTN

Viewing 1 replies (of 1 total)
  • The topic ‘Can I block IPs by country code?’ is closed to new replies.