Forum Discussion
Seckin_149390
Nimbostratus
Sep 09, 2016Irule for Uri and Client IP address.
Hi all,
I want to write irule to check according to both uri and client ip address and here is my test irule ;
when HTTP_REQUEST {
if { ([HTTP::uri] contains "/eqwebservice") and ([class ma...
ekaleido
Cirrus
Sep 09, 2016This will send everything to pool My_443_Pool, unless they use the URI /eqwebservice, then it will check their IP against a datagroup and drop it if it's not a match.
when HTTP_REQUEST {
set httpUri [HTTP::uri]
set clientIp [class match -value [IP::client_addr] equals allowed_ip_addresses]
if { $httpUri starts_with "/eqwebservice" && $clientIp equals "" } {
drop
} else {
pool My_443_Pool
}
}
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