How to add IP Range

Hye, I have cloudflare and I’m also using wordfence. I try implement a firewall rule to protect wp-admin so that in order to access wp-admin you must be in the Bahamas. I utilize this rule below:

The issue I’m having is that once I enable the firewall rule, it then prevents wordfence from doing scans. But when I disable this firewall rule, then wordpress can perform scans. I read wordfence documentation and it say this possibly occuring because wordfence servers may be blocked from reaching my site and they state that their server range is to I want to know how can I allow this server range in cloudflare or what can I do to fix this problem Im having

Use and as IP Address.

Ok so how would I make a rule to allow wordfence IP range to so it will be able to scan? Can you let me know the firewall rule, page rule or whatever that I need to insert thanks in advance.

So you’d need to edit the firewall rule to use an OR within the source. For example, I wrote the following using the expression builder (Go into the firewall rule and click ‘edit expression’, and paste this in there):

(http.request.uri.path eq "/wp-admin" and ne "BS") or (http.request.uri.path eq "/wp-admin" and not ip.src in {})

Anything that comes in for wp-admin with a source of !Bahamas and ! will be blocked (or whatever your action is).

1 Like

Thanks so much :slight_smile:

1 Like