Forum Discussion
rodolfosalgado_
Nov 19, 2018Altostratus
The problem is that IIS will verify your source is an IPV4 address and the HTTP Host header is an IPV6 address thus it will reject that saying that is a Bad Hostname. I made an iRule in my case to to fix this:
when HTTP_REQUEST {
log local0.info "Processing iRule"
set originalHostHeader [HTTP::header Host]
if { $originalHostHeader contains "\[" } then {
HTTP::header insert X-Host-Header $originalHostHeader
set host [string map {"[" ""} $originalHostHeader]
set host [string map {"]" ""} $host]
set host [string map {":" "."} $host]
HTTP::header replace Host $host
}
}
That code is quite simple, just removing what is necessary to fool IIS to think isn't an IPV6 HTTP Host header. That way your IIS won't know that is an IPV6 and will accept the request...