How to forward client IP to back-end server using "x-forwarded-for" header on Citrix ADC

How to forward client IP to back-end server using "x-forwarded-for" header on Citrix ADC

book

Article ID: CTX205455

calendar_today

Updated On:

Description

To forward Client IP to Back-End Server Using "x-forwarded-for" Header 


Instructions

Here is the policy to be created:

add rewrite action xforward_act replace HTTP.REQ.HEADER("X-Forwarded-For") CLIENT.IP.SRC
add rewrite policy xforward_check_pol "HTTP.REQ.HEADER(\"X-Forwarded-For\").EXISTS" xforward_act

Bind the above policy to the appropriate vServer.

Issue/Introduction

This article describes how to forward the client IP to a back-end server using the "x-forwarded-for" header on NetScaler. This helps the back-end sever administrators to track logging.

Additional Information

NetScaler X-Forwarded-For Can Not Work: https://support.citrix.com/article/CTX231582
X-Forwarded-For Header Insert: https://support.citrix.com/article/CTX218061