On 15.02.2016 13:03, Dhanushka Parakrama wrote:
Hi Guys

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 .

I basically want to filter user traffic based on the *X-forwaed-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-value>
         </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 .


Maybe have a look at : http://tuckey.org/urlrewrite/ ?




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

Reply via email to