Forum Discussion
Restricting 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 for any source
Now on F5 I have the following requirement :
I want everybody to access https://www-uat.corpoint.be/
but i want an IP 76.3.3.3 to only access https://www-uat.corpoint.be/rest/leads/callback* and nothing else not even normal URL https://www-uat.corpoint.be/
- AnupamG_354580
Nimbostratus
Dears , Eagerly waiting for a response ; I am a newbie to irules
- youssef1
Cumulonimbus
Hi,
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
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