Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Clear all filters
Answers

How can I preserve the original HTTP Host Header to the Backendservers?

Hi guys,

I'm trying the following configuration to loadbalance a RH SSO Key cloack Cluster:

clientIP -> https/443 -> (clientssl-Profile) F5-Virtual Server (serverssl-Profile) -> SNAT-IP -> tcp8443 -> Backendserver

The Backendserver need to see the original client http Header, so I created a http Profile with the "Insert X-Forwarded-For"-Option enabled.

Alternative I tried the following iRule:

when HTTP_REQUEST { HTTP::header insert X-Forwarded-For [IP::client_addr] }

Unfortunaly, both ways didn't work properly... How can I preserve the whole original HTTP Host Header trough the F5 to the Backendservers?

Thank you!

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

This is the default behavior. X-Forwarded-For option insert client IP address in headers, but doesn't change the Host header.

0
Comments on this Answer
Comment made 19-Jan-2018 by b31 2

All right!

And how can I preserve the whole original client HTTP Host Header trough the F5 to the Backendservers?

0
Comment made 19-Jan-2018 by Stanislas Piron 10481

already answered... the whole original client HTTP Host Header is preserved except if you enabled rewriting profile / irule to rewrite it.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

F5 does not change HTTP headers by default. You can add headers (e.g. X-FORWARDED-FOR) thru http profile config. You can add/delete/modify host headers thru iRule.

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

by default big-ip does not modify http headers. what does make you think that headers are being modified?

0