LeonSmirnov
Nov 05, 2020Nimbostratus
I iRule
We are creating new wildcard virtual server with source and destination 0.0.0.0/0 and service port * (any). We will need to forward traffic with client IP address (no Source Address Translation...
Hello Leon.
You can use this iRule:
when CLIENT_ACCEPTED {
set client_ip [clientside {IP::remote_addr}]
set client_port [clientside {TCP::remote_port}]
set vs_ip [clientside {IP::local_addr}]
set vs_port [clientside {TCP::local_port}]
if { ([ IP::addr $vs_ip eq 172.168.1.11 ]) && ($client_port eq "5555") } {
if { [ IP::addr $client_ip eq 10.11.0.0/16 ] } {
pool Pool1
} else {
pool Pool2
}
}
if { ([ IP::addr $vs_ip eq 10.1.1.1 ]) && ($client_port eq "4444") } {
pool Pool3
}
}
WildCard-Pool should be assigned to the defaul pool configuration in the VS settings.
Regards,
Dario.