Forum Discussion
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!
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!
- PG0581Cirrus
Great! and thanks for the feedback Mayur_Sutare
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com