IBM Support

Remote Address Filter doesn't work in WebSphere Application Server Community Edition 3.0.0.3 when it is associated with Engine

Troubleshooting


Problem

Remote Address Filter Valve allows you to compare the IP address of the client that submitted this request against one or more regular expressions, and either allow the request to continue or refuse to process the request from this client. A Remote Address Filter can be associated with any Catalina container (Engine, Host), and must accept any request presented to this container for processing before it will be passed on. But it's been observed that in WebSphere Application Server Community Edition 3.0.0.3 Remote Address Filter cann't work if you add it into Engine. On the other side it works in Host.

Symptom

The sample show how to add a Remote Address Filter Valve in Engine.

<WASCE_HOME>\var\catalina\server.xml.



<Engine defaultHost="${ServerHostname}" name="Catalina">
    
<Valve className="org.apache.catalina.valves.RemoteAddrValve" deny="127\.\d+\.\d+\.\d+"/>
    <
Host appBase="" autoDeploy="true" name="${ServerHostname}" unpackWARs="true" xmlNamespaceAware="false" xmlValidation="false">
        <
Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs" pattern="common" prefix="${ServerHostname}_access_log." resolveHosts="false" suffix=".txt"/>
    <
/Host>
<
/Engine>


The remote address filter valve's purpose here is to ask the server to refuse to process the request from 127.*.*.*. But it doesn't work. The server still handle the request from 127.*.*.*.

Resolving The Problem

To fix the issue, please refer the instruction below:

1. Download the patch file:TomcatValvePatch.zipTomcatValvePatch.zip

2. Unzip the attached file into the WebSphere Application Server Community Edition installation directory, and ensure the files listed in the zip file to replace the ones in the server installation.

3. Start the server with the cache cleaned, for example,

<WAS_CE_HOME>\bin\startup -c

<WAS_CE_HOME>/bin/startup.sh -c

[{"Product":{"code":"SS6JMN","label":"WebSphere Application Server Community Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"3.0.0.3","Edition":"Entry;Enhanced;Elite","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
15 June 2018

UID

swg21638625