Forum Discussion
PG0581
Apr 21, 2018Cirrus
Adding in the config as my question was being marked as spam
Virtual server config:
ltm virtual Test123-8892 {
destination 1.1.1.1:8892
ip-protocol tcp
mask 255.255.255.255
profiles {
fastL4 { }
}
rules {
FQDN-pool-select
}
source 0.0.0.0/0
translate-address enabled
translate-port enabled
vs-index 170
}
`
Pool config:
` ltm pool Test_Pool-8892-pool {
members {
2.2.2.2:8892 {
address 2.2.2.2
session monitor-enabled
state up
}
}
monitor tcp
`
}
`ltm pool Test_Pool_2-8892-pool {
members {
3.3.3.3:8892 {
address 3.3.3.3
session monitor-enabled
state down
}
4.4.4.4:8892 {
address 4.4.4.4
session monitor-enabled
state up
}
}
monitor tcp
`
}
iRule config:
` ltm rule FQDN-pool-select {
when HTTP_REQUEST {
if { [HTTP::host] eq "test.abc.com" } {
pool Test_Pool-8892-pool
}
elseif { [HTTP::host] eq "test2.def.com" } {
pool Test_Pool_2-8892-pool
}
} }