Skip to main content

Problem:

  • Product Name: Borland Application Server
  • Product Version: 6.5
  • Product Component: Web Container (Tomcat)
  • Platform/OS Version: All
  • JDK Version: All supported JDK version

Tomcat access_log prints an incorrect IP Address -- even though the request is coming from a fixed IP address within the network, an incorrect/different IP Address is printed inside the log instead.

Resolution:

Servlet application i.e. request.getRemoteAddr() & request.getRemoteHost() will return the Proxy server IP Address/Hostname instead of Clients IP Address/Hostname if your web browser settings has the proxy server configured. The request will come through the proxy server and Tomcat is correct to print out the proxy server IP.

You can know the actual client IP address by pointing to "Direct connection to the Internet" in your browser.

Additional Information:

This situation could also arise in a cluster environment with a number of different configurations/partitions. Some of them may be using a loadbalancer (hardware) to distribute the loads to the various partitions.

Please follow the following steps to check if this issue may be caused by the loadbalancer:

  1. Make a request to a partition which has no loadbalancer access and verify the Tomcat access log on whether the correct IP is being printed.
  2. Make a similar request to a partition with loadbalancer access and verify the Tomcat access log on whether the correct IP is being printed.

If a correct IP is being printed on the Step 1 and an incorrect IP is being printed the Step 2, you will need to contact your Network Administrator on whether the loadbalancer has been configured correctly.


Author: Mathius Allo

Old KB# 15546

#Security
#WebContainer
#VisiBroker
#tomcat
#BorlandApplicationServer