Forum Discussion
veredgf
Feb 04, 2020Nimbostratus
limit IP access to certain URIs
Hi,
I am looking for help creating an IRULE for the following conditions:
- Allow access to two URIs within the policy to a specific group of IPs.
- Disallow access to these URIs to all other IPs.
I tried creating a traffic policy for this but was unsuccessful.
Thanks
Vered
- DmitryAltocumulus
it will be look like there:
when HTTP_REQUEST { if { [ class match [ string tolower [HTTP::uri] ] starts_with dg_uri ] and not ( [class match IP::client_addr] equals private_net] ) } { HTTP::respond 302 noserver Location "http://[HTTP::host]/errorpage.html" } }
dg_uri is data group list with your URIs (type string)
private_net is data group list with your IPs/subnets (type address)
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