e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
set hsl [HSL::open -proto TCP -pool PoolB]
}
when HTTP_REQUEST {
set request_header [HTTP::request]
set host_header [HTTP::host]
HTTP::header replace host "HOSTA"
pool PoolA
HTTP::collect [HTTP::header Content-Length]
}
when HTTP_REQUEST_DATA {
HSL::send $hsl "[string map [list "Host: $host_header" "Host: HOSTB"] $request_header][HTTP::payload]"
}
}
[root@ve10:Active] config b pool PoolA list
pool PoolA {
members 200.200.200.101:80 {}
}
[root@ve10:Active] config b pool PoolB list
pool PoolB {
members 172.28.19.251:80 {}
}
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.20.11(44068) <-> 172.28.19.79(80)
1354257648.3008 (0.0030) C>S
---------------------------------------------------------------
POST /something HTTP/1.1
User-Agent: curl/7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8x zlib/1.2.3 libidn/0.6.5
Accept: */*
Host: test.com
Content-Length: 14
Content-Type: application/x-www-form-urlencoded
postdata123456---------------------------------------------------------------
New TCP connection 2: 172.28.19.80(58639) <-> 172.28.19.251(80)
1354257648.3016 (0.0007) C>S
---------------------------------------------------------------
POST /something HTTP/1.1
User-Agent: curl/7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8x zlib/1.2.3 libidn/0.6.5
Accept: */*
Host: HOSTB
Content-Length: 14
Content-Type: application/x-www-form-urlencoded
postdata123456---------------------------------------------------------------
New TCP connection 3: 200.200.200.10(44068) <-> 200.200.200.101(80)
1354257648.3017 (0.0007) C>S
---------------------------------------------------------------
POST /something HTTP/1.1
User-Agent: curl/7.19.7 (i686-redhat-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8x zlib/1.2.3 libidn/0.6.5
Accept: */*
Host: HOSTA
Content-Length: 14
Content-Type: application/x-www-form-urlencoded
postdata123456---------------------------------------------------------------