class myIPRelations {
"192.168.30.119 images.test.com"
}
when HTTP_REQUEST {
set newHost [findclass [IP::remote_addr] $::myIPRelations " "]
if { [string length $newHost] > 1 } {
HTTP::header replace Host $newHost
}
}
The above rule does not seem to work.
When we go threw the bigip we see the following result when we run a tcp dump from the server.
GET /parts/img/bcl/bc23220.jpg HTTP/1.1
Host: images.test.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: 300
Connection: keep-alive
Cache-Control: max-age=0
Now when we go to the server directly it works- this is what we see.
this is from a tcpdump on the server again. Notice we do not see the "referer" in the capture above
GET /parts/img/acd/10072.jpg HTTP/1.1
Host: images.dev.test.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.1) Gecko/20060313 Fedora/1.5.0.1-9 Firefox/1.5.0.1 pango-text
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
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: 300
Connection: keep-alive
Referer: http://images.dev.test.com/parts/img/acd/
If-Modified-Since: Wed, 15 Mar 2006 14:40:49 GMT
If-None-Match: "3ace1-4c32-44182771"
Cache-Control: max-age=0