PG0581
Jul 21, 2022Cirrus
Whitelist certain inbound IPs
Could someone verify if this syntax is correct, please?
I am looking to only permit certain source IPs contained in the data group "abc_ips" when navigating to a URL and dropping anything else.
when HTTP_REQUEST {
if { [class match [IP::client_addr] eq "abc_ips" ] } {
return
} else {
drop
}
}
Hi PG0581 ,
Yes, syntax looks good to me. Additionally, you can even add the response page with some message to the unwanted source IP addresses who are trying to access it. Just a suggetion in case you need it. Thanks!