Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 79569 invoked from network); 6 Jan 2010 16:32:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 6 Jan 2010 16:32:34 -0000 Received: (qmail 85269 invoked by uid 500); 6 Jan 2010 16:32:31 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 85179 invoked by uid 500); 6 Jan 2010 16:32:31 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 85168 invoked by uid 99); 6 Jan 2010 16:32:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 16:32:30 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [85.158.206.36] (HELO xebia-exchange.hosted.xebia.com) (85.158.206.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Jan 2010 16:32:19 +0000 Received: from mail-bw0-f221.google.com ([209.85.218.221]) by xebia-exchange.hosted.xebia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 6 Jan 2010 17:23:53 +0100 Received: by bwz21 with SMTP id 21so10763677bwz.24 for ; Wed, 06 Jan 2010 08:31:58 -0800 (PST) MIME-Version: 1.0 Received: by 10.102.216.26 with SMTP id o26mr9185477mug.120.1262795518501; Wed, 06 Jan 2010 08:31:58 -0800 (PST) X-Originating-IP: [86.65.15.100] In-Reply-To: <2dfefcd21001060752h22572813u7744db80b641e56d@mail.gmail.com> References: <2dfefcd21001052014m2f063d6ata5c38893edd5246d@mail.gmail.com> <4B443EA6.2060602@apache.org> <2dfefcd21001060741y210b42ebo6df588ef33375d@mail.gmail.com> <2dfefcd21001060752h22572813u7744db80b641e56d@mail.gmail.com> Date: Wed, 6 Jan 2010 17:31:58 +0100 Message-ID: <1db564171001060831h2745c687h9d250762908467c8@mail.gmail.com> Subject: Re: Changing request address to x-forwarded-for From: Cyrille Le Clerc To: Tomcat Users List Content-Type: text/plain; charset=ISO-8859-1 X-OriginalArrivalTime: 06 Jan 2010 16:23:53.0312 (UTC) FILETIME=[A3174E00:01CA8EEC] X-Virus-Checked: Checked by ClamAV on apache.org Hello Mohit, You can use this RemoteIpValve (1) on Tomcat 6.0.18, you just have to drop the xebia-tomcat-extras-1.0.0.jar (2) in your Tomcat lib directory. This version is being used on several web sites including high volume ones. If you can wait few days, a new version of Tomcat 6 including this valve will hopefully be released very soon ; vote has started on the tomcat-dev mailing list just before christmas. Don't hesitate to ask questions if the docs aren't clear enough, Hope this helps, Cyrille -- Cyrille Le Clerc cleclerc@xebia.fr http://blog.xebia.fr (1) http://code.google.com/p/xebia-france/wiki/RemoteIpValve (2) http://xebia-france.googlecode.com/files/xebia-tomcat-extras-1.0.0.jar On Wed, Jan 6, 2010 at 4:52 PM, Mohit Anchlia wrote: > > I found this site > > http://code.google.com/p/xebia-france/wiki/RemoteIpValve > > Can I directly download and install it in 6.0.18? > > On Wed, Jan 6, 2010 at 7:41 AM, Mohit Anchlia wrote: > > Could you please point me to an example of how I can do this? We are > > using apache-tomcat-6.0.18 > > > > On Tue, Jan 5, 2010 at 11:41 PM, Mark Thomas wrote: > >> On 06/01/2010 04:14, Mohit Anchlia wrote: > >>> tomcat 6: > >>> > >>> Is it possible to inject or change remote address to what's in > >>> x-forwaded-for in http header such that when Servlet received the > >>> request it's already in the request.getRemoteAddress()? Otherwise > >>> we'll need to make a urgent change to read from the HTTP header. We > >>> didn't realize it earlier since we are using F5 LTM. > >> > >> The next release of Tomcat 6 will include a new valve (RemoteIpValve) to > >> do exactly this. If you can't wait for the next 6.0.x release (should be > >> soon - hopefully next week or so) then you can always use that as the > >> basis to write your own valve. Alternatively, Tomcat 7 also has a filter > >> that does the same thing that you could use as a startign point. > >> > >> Mark > >> > >> > >> > >> --------------------------------------------------------------------- > >> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > >> For additional commands, e-mail: users-help@tomcat.apache.org > >> > >> > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org