Forum Discussion
Arie
Altostratus
Sep 14, 2006IIS logs show LB IP address for all requests
Our IIS logs are showing the LB's IP address for all requests instead of the clients' IP addresses.
Any idea how to fix this?
2 Replies
- JRahm
Admin
It appears you are using the snat function, which translates the client IP to the F5 IP. You will need to pass the client IP in a header, done in the HTTP profile by enabling the Insert XForwarded For setting, or in an irule. You will need to extract this information on the server side, I think there are examples how to do this for IIS on this forum if you search for it. - paul_adomeit_70
Nimbostratus
Setting x-forwarded-for is the easy part. There is a fantastic ISAPI custom log filter in the downloads section that causes the IIS server to log the value in the x-forwarded-for as the client IP address in the web logs. We use this so all our web log processing tools still work and for trouble shooting.
For Apache, there are plenty of examples. When the request comes in, set a variable if the header exists. Then, set two log formats (one where x-forwarded-for is substituted for the requesting IP) and select the log statment based on the state of the variable.
For SunOne, you have to enable advanced logging but there's no way to selectivly log the real client IP presented if there's no x-forwarded-for. We just ran the logs through some processing to get the real client IP address in the right spot after the fact.
-p
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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