• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 376
  • Last Modified:

AS/400 Apache Reverse Proxy maintaining original IP address

I set up a port 80 reverse proxy server that handles all incoming internet traffic and passes on to one of many intranet servers.  What I seem to find is that the intranet servers do not maintain the original IP of the incoming request but instead list the IP of the proxy as the actual IP.  Is there a way to maintain the original IP for better user tracking?
1 Solution
If the Apache you are running as a proxy is version 2.x or a recent version of 1.3.x, it should pass along the X-Forwarded-For header.

For an intranet server that is Apache, add to your log format:


to log the client's IP address.

If the Apache proxy you are using is an older version 1.3.x, you might want to look around for third-party module such as mod_proxy_add_forward to pass on the information.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now