Need clarification for a WAF rule with custom expression

I have this page rule and it does not appear to restrict access to just the specific IP addresses only.

(ssl and http.request.uri.path contains “demo**” and (ip.src eq 172.100.200.100 or ip.src eq 172.101.201.101 ))

the URL I tries to access from my home is

https://www.test.com/demo/home

Thanks

demo** is not valid syntax for contains. Only Page Rules and RegEx (“Matches”) use asterisks. For “Contains”, you need only the characters that visually appear in the path.

1 Like

I wanted to restrict access such as these URLS to the two IP address. What is the correct expression?

https://www.test.com/demo/home
https://www.test.com/demo/images
https://www.test.com/demo/contact-us
https://www.test.com/demo/product-catalogue/page-1

Thanks.

Correct syntax would be (ssl and http.request.uri.path contains “demo” and (ip.src eq 172.100.200.100 or ip.src eq 172.101.201.101 ))

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.