Forum Discussion
Huw_Jenkins_425
Nimbostratus
Dec 01, 2006Preserve Client IP in HTTP Header when using SNAT
Hi
i am trying to configure an iRule to preserve the client ip address when connecting to a VS. i have configured the following iRule, and added to the VS, but when i view the IIS logs on the web server they are still showing up the LB address. any ideas where how I
when HTTP_REQUEST {
HTTP::header insert ORIG_CLIENT_IP [IP::remote_addr]
}
i am new to iRules so any help would be grateful, thanks
- Chad_Roberts_21
Nimbostratus
I think the only thing wrong with your iRule is that you're using [IP::remote_addr] instead of [IP::client_addr]. Be definition, you're using the end IP, not the start.ORIG_CLIENT_IP:[IP::client_addr]
- hoolio
Cirrostratus
I think deathbywedgie's suggestion is easier to insert the original client IP address in the XFF header, than using a rule. - Julien_Virag_48
Nimbostratus
Hello, - hoolio
Cirrostratus
IIS won't log custom headers by default, which is why the DLL is necessary. The source code for the DLL is included, so you can see what it is doing if that's your concern. - Huw_Jenkins_425
Nimbostratus
Thanks Guys - tarma_58716
Nimbostratus
hello guys - hoolio
Cirrostratus
Make sure to put a space between the header name and value:
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