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 69.46.36.0 to 69.46.36.32 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 69.46.36.0/27 and 69.46.36.32/32 as IP Address.

Ok so how would I make a rule to allow wordfence IP range 69.46.36.0 to 69.46.36.32 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 ip.geoip.country ne "BS") or (http.request.uri.path eq "/wp-admin" and not ip.src in {69.46.36.0/27})

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

1 Like

Thanks so much :slight_smile:

1 Like