• Resolved focct

    (@focct)


    I have a small non-profit and we are using the free version of WordFence. Given the large number of hack attempts from countries like China, Russia and others I’d like to block the ranges within these countries with the larges distribution of IP addresses. Our customer based it very regional in the U.S. so there is no issue will blocking large ranges.

    Is it possible to create a custom pattern that includes multiple ranges? For example, could I create a rule for 36.96.0.0-36.223.255.255 and 59.192.0.0-60.31.255.255? Would a comma (,) or semi-colon (;) work to string multiple IP ranges together? If so, how many ranges can I include in a single rule? From a performance perspective would it be more efficient if I created a new custom pattern for each range?

    Thanks!

Viewing 1 replies (of 1 total)
  • Hi @focct,

    You can only add one IP range per custom pattern, so if you have multiple ranges, you will need to add them one-by-one into Wordfence.

    Alternatively, you can explore using .htaccess to block IP ranges. For example:

    Order Allow,Deny
    Deny from 1.2.3.4/24
    Allow from all

    The above code would block 1.2.3.0 -> 1.2.3.255.

    Dave

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Pattern – Multiple IP Ranges’ is closed to new replies.