Re: Client Real Source IP!
Thanks for the information,Anyone can provide more detail on how this can be done? how the code is done perhaps? - Original Message From: Li <[EMAIL PROTECTED]> To: Tomcat Users List Sent: Friday, September 22, 2006 1:42:14 PM Subject: Re: Client Real Source IP! Sorry Alexander, Yeah, as Peter said, you can use getHeader(s) from Servlet API. Only if your request header is customized one (like those for telecom), you should read it by yourself. On 9/22/06, Peter Rossbach <[EMAIL PROTECTED]> wrote: > > You can access the header with ServletRequest.getHeader, getHeaders, > getHeadersNames. > > Read Servlet Spec 2.4 or 2.5 Headers 4.3 > > > Wrote your own Valve or ServletFilter > > Regards > Peter > > > Am 22.09.2006 um 06:44 schrieb Alexander Khoo: > > > Dear All, > > > > We currently have Tomcat Version5 install behind Pound reverse > > proxy! Our code cant identify the real source client IP instead the > > reverse proxy IP everytime, We understand Pound adds the X- > > Forwarded-for header with the original client address to every > > requestbut how we can identify it? > > > > > > Please Help! > > Alexander Khoo > > > -- When we invent time, we invent death.
Re: Client Real Source IP!
Sorry Alexander, Yeah, as Peter said, you can use getHeader(s) from Servlet API. Only if your request header is customized one (like those for telecom), you should read it by yourself. On 9/22/06, Peter Rossbach <[EMAIL PROTECTED]> wrote: You can access the header with ServletRequest.getHeader, getHeaders, getHeadersNames. Read Servlet Spec 2.4 or 2.5 Headers 4.3 Wrote your own Valve or ServletFilter Regards Peter Am 22.09.2006 um 06:44 schrieb Alexander Khoo: > Dear All, > > We currently have Tomcat Version5 install behind Pound reverse > proxy! Our code cant identify the real source client IP instead the > reverse proxy IP everytime, We understand Pound adds the X- > Forwarded-for header with the original client address to every > requestbut how we can identify it? > > > Please Help! > Alexander Khoo -- When we invent time, we invent death.
Re: Client Real Source IP!
You can access the header with ServletRequest.getHeader, getHeaders, getHeadersNames. Read Servlet Spec 2.4 or 2.5 Headers 4.3 Wrote your own Valve or ServletFilter Regards Peter Am 22.09.2006 um 06:44 schrieb Alexander Khoo: Dear All, We currently have Tomcat Version5 install behind Pound reverse proxy! Our code cant identify the real source client IP instead the reverse proxy IP everytime, We understand Pound adds the X- Forwarded-for header with the original client address to every requestbut how we can identify it? Please Help! Alexander Khoo
Re: Client Real Source IP!
Hi, You need create your own request proecessor to retrieve it. You may have to get http request full length header first and lookup your request header structure and read block by block from the header. A better way is to take a look at few headers and see if the block you need is always after which block and what is the length. Normally if adding extra info into header, the reserved blocks should be appeared before the extra info. Wish it helps On 9/22/06, Alexander Khoo <[EMAIL PROTECTED]> wrote: Dear All, We currently have Tomcat Version5 install behind Pound reverse proxy! Our code cant identify the real source client IP instead the reverse proxy IP everytime, We understand Pound adds the X-Forwarded-for header with the original client address to every requestbut how we can identify it? Please Help! Alexander Khoo -- When we invent time, we invent death.
Client Real Source IP!
Dear All, We currently have Tomcat Version5 install behind Pound reverse proxy! Our code cant identify the real source client IP instead the reverse proxy IP everytime, We understand Pound adds the X-Forwarded-for header with the original client address to every requestbut how we can identify it? Please Help! Alexander Khoo