Forum Discussion
iRule for access to two ip addresses to a URI
Hi!
I am looking for
a way to make
a irule.
Only
these two
ip's
can access
this
path.
All other
IP addresses
must access
anywhere but
not
to the
selected
URI
.
when CLIENT_ACCEPTED {
if { [IP::client_addr] equals 192.168.1.10 } {
pool MY_POOL_A
}
elseif { [IP::client_addr] equals 192.168.1.11 } {
pool MY_POOL_A
}
}
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/abc/dfg/"} {
pool MY_POOL_A
}
else {
default
}
}
}
This rule or similar, it's might work?
Regards
A. Diezma
- hoolioCirrostratusHi,
when HTTP_REQUEST { Check for requests to the restricted URI if { [HTTP::uri] starts_with "/abc/dfg/"} { Check if the client IP is not in the allowed clients data group if {![class match [IP::client_addr] equals allowed_clients_dg]}{ Send a 403 response HTTP::respond 403 content {blocked!
Aaron
- adiezma_1656NimbostratusIt's worked!!
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