Forum Discussion
M0d3u52014_1653
Nimbostratus
May 02, 2016IPV6 Virtual Server with IPV4 pool members all I get is error 400 The request hostname is invalid.
I a standard VS running as a public IPV6 address with a single IPV4 IIS 8.5 pool member behind it, separate VLANs using automap. I can reach the site no problem, and I know its doing so because the c...
rodolfosalgado_
Altostratus
Nov 19, 2018The 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...
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects