Forum Discussion
nitass
Mar 15, 2013Employee
virtual server isn't listening on port 4000 and 8000, is it? so, is this what you are asking?
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
set host [HTTP::host]
set uri [HTTP::uri]
switch [HTTP::host] {
"testapp1.domain.com" { pool foo4000 }
"testapp2.domain.com" { pool foo8000 }
default {
do something
}
}
}
when HTTP_RESPONSE {
log local0. "client [IP::client_addr]:[TCP::client_port] \
virtual server [clientside {IP::local_addr}]:[clientside {TCP::local_port}] \
server [IP::server_addr]:[TCP::server_port] \
pool [LB::server pool] \
http host $host \
http uri $uri"
}
}
[root@ve10:Active] config b pool foo4000 list
pool foo4000 {
members 200.200.200.101:4000 {}
}
[root@ve10:Active] config b pool foo8000 list
pool foo8000 {
members 200.200.200.101:8000 {}
}
[root@ve10:Active] config tail -f /var/log/ltm
Mar 15 21:03:18 local/tmm info tmm[4950]: Rule myrule : client 172.28.19.251:44195 virtual server 172.28.19.252:80 server 200.200.200.101:4000 pool foo4000 http host testapp1.domain.com http uri /something
Mar 15 21:03:51 local/tmm info tmm[4950]: Rule myrule : client 172.28.19.251:44196 virtual server 172.28.19.252:80 server 200.200.200.101:8000 pool foo8000 http host testapp2.domain.com http uri /somewhereelse