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"...
youssef1
Cumulonimbus
Apr 16, 2019Hi
you can try this:
when HTTP_REQUEST {
if { [IP::addr [IP::client_addr] equals 192.168.0.0/16] } {
switch [string tolower [HTTP::host]] {
"sd.informe.xx" {
pool inside_pool_443
}
"sd2.informe.xx" {
pool pool_outside_443
}
"sdint.informe.xx" {
pool pool_inside_444
}
default {
don't do anything...
}
}
}
}
You can also do it using LTM Policy. it will be more simple and it's done per request...
If you use irule for your need don't forget to set oneconnect profile in order to detach session...
Regards
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