Forum Discussion
Thiago_Morais
Jan 11, 2021Altostratus
iRule with HTTP::request and datagroup
Hi Guys, I need to create an iRule that will check two conditions: 1) HTTP::request contain a specific word "test" 2) The source IP is a member of the Datagroup I would like to cre...
Mayur_Sutare
Jan 13, 2021MVP
Yes it should! I tested below iRule on my lab setup and it is working fine. You can try your iRule using above IF Statement and test.
when HTTP_REQUEST {
if {([HTTP::host] contains "test") && ([class match [IP::client_addr] equals Allow-List])} {
pool TEST-Pool
log local0. "Allowed client IP is [IP::client_addr]"
} else {
log local0. "Dropped IP is [IP::client_addr]"
}
}
Hope it helps!
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