I’m receiving 0 results with a GET /firewall/rules for an IP range, using CIDR when I’ve confirmed an iP address “block” rule exists for an IP in that range.
For example
A rule blocking 188.173.167.10 exists and will be returned when I either specify that exact IP or when I omit IPs, but when using a range, nothing is returned.
Here’s the GET end point & querystring that’s returning zero results:
https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules?mode=block¬es=fail2ban&configuration.target=ip_range&configuration.value=188.173.167.0/16&page=1&per_page=20
Am I doing something wrong?
This GET works fine:
https://api.cloudflare.com/client/v4/user/firewall/access_rules/rules?mode=block¬es=fail2ban&configuration.target=ip&configuration.value=188.173.167.10&page=1&per_page=20
Only the pagination parameters in your request seem to be valid parameters
https://api.cloudflare.com/#firewall-rules-list-of-firewall-rules
The description did not suggest that
Anyhow, I believe you cant search for a range of which a configured single address is part of. configuration.target
should be an exact match in my understanding. You might want to double check that with support though.
The search in the UI seems to confirm that.
Ahhh, I understand now. The command is looking for a rule that is itself an IP range.
Thank you Sandro. I appreciate your insight & checking upon that.