Forum Discussion
nitass
Nov 13, 2010Employee
not sure if i understand correctly. pls feel free to revise.
v10.1.0
virtual bar {
snat automap
pool foo
destination 172.28.17.55:http
ip protocol tcp
rules myrewrite
profiles {
http {}
tcp {}
}
}
pool foo {
members {
10.10.70.110:http {}
10.10.70.120:http {}
10.10.70.130:http {}
}
}
class myhost {
{
"10.10.70.110" { "node1" }
"10.10.70.120" { "node2" }
"10.10.70.130" { "node3" }
}
}
rule myrewrite {
when HTTP_REQUEST_SEND {
clientside {
if {[HTTP::host] equals "172.28.17.55"} {
HTTP::header replace Host "[class match -value [LB::server addr] equals myhost]"
}
}
}
}
client side:
GET / HTTP/1.1
Host: 172.28.17.55
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive
server side:
GET / HTTP/1.1
Host: node3
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 115
Connection: keep-alive