Forum Discussion
How to restrict a url access from a specific two ip's
hi,
what about below irule: whether it will meet the requirement:
when HTTP_REQUEST {
if{[HTTP::path] contains "/abc/update" and [IP::addr [IP::client_addr] equals 104.123.3.1] or [IP::addr [IP::addr [IP::client_addr] equals 117.23.2.1]}
else{
reject
}
Could you confirm whether source IPs 104.123.3.1 and 117.23.2.1 should be *allowed* to access path "/abc/update". Or should they be denied?
- CHRISTY_THOMASJan 05, 2024Cirrus
only IPs 104.123.3.1 and 117.23.2.1 can acces to path "/abc/update". remainng Ip connections from internet towards acess path "/abc/update" should be droped/blocked
- Jan 05, 2024
Thanks for confirming.
I made a few minor adjustments to fix syntax issues, but this should work:
when HTTP_REQUEST { if { [HTTP::path] contains "/abc/update" and (([IP::addr [IP::client_addr] equals 104.123.3.1]) or ([IP::addr [IP::client_addr] equals 117.23.2.1])) } { } else { reject } }
- CHRISTY_THOMASJan 05, 2024Cirrus
i have checked in my application. while i am calling this irule in VS the other url's pertaining to the application also not loading in the browser
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