Hi,
Use does not match regex match operation
![](https://higherlogicdownload.s3.amazonaws.com/IMPERVA/MessageImages/398ee0afb4ea40b39babb4a8392e73b8.png)
Use the below regex:
^((25[0-5]|(2[0-4]|1\d|[1-9]|)\d)\.?\b){4}$
This will effectively block all request where the parameter IP is not a valid IP address.
You can try out the regex
here.
Note: this is for any valid IP, including reserved IP addresses like 127.0.0.1, 0.0.0.54, 169.0.0.1 etc.
Regards,
------------------------------
Sarvesh Lad
Tech Lead @ On-Prem Managed Services (WAF, DAM, DRA & Sonar)
------------------------------
Original Message:
Sent: 12-07-2022 10:25
From: Jorge Luis Santamaria Silupu
Subject: Block invalid IP
I want to block requests with invalid IPs.
Is there a way?
![](https://higherlogicdownload.s3.amazonaws.com/IMPERVA/MessageImages/daf6fab3139649ddb207b5ef3b6cd382.png)
I have created rules to block invalid IPs but I want to block large requests.
![](https://higherlogicdownload.s3.amazonaws.com/IMPERVA/MessageImages/3962b4ae80ec4106af6b223f65161734.png)
#On-PremisesWAF(formerlySecuresphere)