Forum Discussion
AnupamG_354580
Nimbostratus
Jul 04, 2018Restricting access to a client to only access certain URI and nothing else
I have a URI https://www-uat.corpoint.be/
and then i have this also https://www-uat.corpoint.be/rest/leads/callback*
On firewall we have allowed the public IP which resolve to this URI ...
youssef1
Cumulonimbus
Jul 04, 2018Hi,
try this:
when HTTP_REQUEST {
if { !([string tolower [HTTP::path]] starts_with "/rest/leads/callback" )
&& ( [IP::addr [IP::client_addr] equals 76.3.3.3/32] ) } {
log local0. "dropped"
HTTP::respond 200 content "URL Blocked"
}
}
You can also used data group if you have multiple URI, it can help you:
https://devcentral.f5.com/questions/restricting-access-to-uri-based-on-ip-address
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects