-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dhanushka,

On 2/15/16 7:03 AM, Dhanushka Parakrama wrote:
> I have a Tomcat instance behind the load balancer (LB) , LB will
> pass the client ip address to backed tomcat instance using
> *X-forward-for*  header .

Note that the HTTP header is actually "X-Forwarded-For", not
"X-Forward-For".

> I basically want to filter user traffic based on the
> *X-forward-for* header in tomcat instance.
> 
> i have configured the following filter in tomcat , but it not
> working
> 
> 
> <filter> <filter-name>Remote Address Filter</filter-name> 
> <filter-class>org.apache.catalina.filters.RemoteIpFilter</filter-class
>
>
> 
<init-param>
> <param-name>allow</param-name>
> 
> <param-value>localhost|205\.97\.96\.\d+|::1|0:0:0:0:0:0:0:1</param-val
ue>
>
> 
</init-param>
> </filter>
> 
> <filter-mapping> <filter-name>Remote Address Filter</filter-name> 
> <url-pattern>/mgt/*</url-pattern> </filter-mapping>
> 
> Do you guys have any advice how to achieve it .

I think you are trying to do the following:
https://tomcat.apache.org/tomcat-8.0-doc/config/filter.html#Advanced_con
figuration_with_internal_proxies

You haven't specified the filter's init-param names correctly.
Double-check your configuration and try again.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlbB6QIACgkQ9CaO5/Lv0PBHugCfTTH3/A7ZTiZOf0fIQODOEnpy
Rc4AoMLmT8H/44+0/mlntHpT3ogaQXVy
=+JVs
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to