Forum Discussion
MartinS
Nimbostratus
Apr 16, 2019irule based on source ip and http host
Hello,
could anyone help me with irule which should choose address pool based on HTTP::host and Client IP address?
I started with
when HTTP_REQUEST {
if { ([HTTP::host] equals "sd.informe.xx"...
Lee_Sutcliffe
Nacreous
Apr 16, 2019Hi please try this iRule and let me know how you get on, I notice you have a
"!"
on the second if condition. I assume you want this to mean not equals to
.
when HTTP_REQUEST {
set ipMatch [IP::addr 192.168.0.0/16 equals [IP::client_addr]]
switch [HTTP::host] {
"sd.informe.xx" {
if {$ipMatch} {
pool inside_pool_443
} else {
pool pool_outside_443
}
}
"sdint.informe.xx" {
if {$ipMatch} {
pool pool_inside_444
}
}
}
}
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