You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Oleg Bartunov <ol...@sai.msu.su> on 2003/04/13 17:33:55 UTC

duplicated IP in X-Forwarded-For

Hi there,

configuring frontend-backend (apache 1.3.27) I noticed last ip in
X-Forwarded-For is duplicated. Seems (from proxy_http.c), mod_proxy now
generates X-Forwarded-For itself. Earlier versions ( I checked 1.3.9)
doesn't generate X-Forwarded-For.

Do we need mod_proxy_add_forward.c now ?

A small problem arises if I don't use mod_proxy_add_forward.c -
I can't log X-FORWARDED-FOR in proxy's access_log via \"%{X-FORWARDED-FOR}i\"


	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Re: duplicated IP in X-Forwarded-For

Posted by Oleg Bartunov <ol...@sai.msu.su>.
On Mon, 14 Apr 2003, Issac Goldstand wrote:

>
>
>
> > Oleg Bartunov wrote:
> > > On Sun, 13 Apr 2003, Issac Goldstand wrote:
> > >
> > >
> > >>*Grins*  I remember when a couple of us blindly ported
> > >>mod_proxy_add_forward.c to Apache 2 just after it was officially
> declared
> > >>"stable", only to test it and discover the same thing for ourselves :-)
> The
> > >>answer is that it's a standard part of mod_proxy since (I believe)
> 1.3.26...
> >
> > > I believe so now. The only problem is how to log those ip's by proxy
> server.
> >
> > patch mod_proxy to do what mod_proxy_add_forward was doing and submit the
> > patch for inclusion in the next mod_proxy release?
>
> I don't quite think so.  I'm really quite baffled as to why he can't log any
> more.  I'm thinking that's more a problem with mod_log_xxxxx (whatever might
> be used now) than a problem with mod_proxy.  Oleg, are you sure you've
> compiled in whichever logging modules you used to have compiled in (or DSO'd
> in)?

That was my fault ! I wrote X-FFORWARDED-FOR instead of X-FORWARDED-FOR
                              ^
Now everything works fine. Thanks for help.
I think I'll play with mod_accel instead of mod_proxy.

>
>   Issac
>

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Re: duplicated IP in X-Forwarded-For

Posted by Issac Goldstand <ma...@beamartyr.net>.


> Oleg Bartunov wrote:
> > On Sun, 13 Apr 2003, Issac Goldstand wrote:
> >
> >
> >>*Grins*  I remember when a couple of us blindly ported
> >>mod_proxy_add_forward.c to Apache 2 just after it was officially
declared
> >>"stable", only to test it and discover the same thing for ourselves :-)
The
> >>answer is that it's a standard part of mod_proxy since (I believe)
1.3.26...
>
> > I believe so now. The only problem is how to log those ip's by proxy
server.
>
> patch mod_proxy to do what mod_proxy_add_forward was doing and submit the
> patch for inclusion in the next mod_proxy release?

I don't quite think so.  I'm really quite baffled as to why he can't log any
more.  I'm thinking that's more a problem with mod_log_xxxxx (whatever might
be used now) than a problem with mod_proxy.  Oleg, are you sure you've
compiled in whichever logging modules you used to have compiled in (or DSO'd
in)?

  Issac


Re: duplicated IP in X-Forwarded-For

Posted by Stas Bekman <st...@stason.org>.
Oleg Bartunov wrote:
> On Sun, 13 Apr 2003, Issac Goldstand wrote:
> 
> 
>>*Grins*  I remember when a couple of us blindly ported
>>mod_proxy_add_forward.c to Apache 2 just after it was officially declared
>>"stable", only to test it and discover the same thing for ourselves :-)  The
>>answer is that it's a standard part of mod_proxy since (I believe) 1.3.26...

> I believe so now. The only problem is how to log those ip's by proxy server.

patch mod_proxy to do what mod_proxy_add_forward was doing and submit the 
patch for inclusion in the next mod_proxy release?


__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


Re: duplicated IP in X-Forwarded-For

Posted by Oleg Bartunov <ol...@sai.msu.su>.
On Sun, 13 Apr 2003, Issac Goldstand wrote:

> *Grins*  I remember when a couple of us blindly ported
> mod_proxy_add_forward.c to Apache 2 just after it was officially declared
> "stable", only to test it and discover the same thing for ourselves :-)  The
> answer is that it's a standard part of mod_proxy since (I believe) 1.3.26...

Thanks Issac,

I believe so now. The only problem is how to log those ip's by proxy server.

>
> Cheers,
>   Issac
>
> ----- Original Message -----
> From: "Oleg Bartunov" <ol...@sai.msu.su>
> To: <mo...@perl.apache.org>
> Sent: Sunday, April 13, 2003 6:33 PM
> Subject: duplicated IP in X-Forwarded-For
>
>
> > Hi there,
> >
> > configuring frontend-backend (apache 1.3.27) I noticed last ip in
> > X-Forwarded-For is duplicated. Seems (from proxy_http.c), mod_proxy now
> > generates X-Forwarded-For itself. Earlier versions ( I checked 1.3.9)
> > doesn't generate X-Forwarded-For.
> >
> > Do we need mod_proxy_add_forward.c now ?
> >
> > A small problem arises if I don't use mod_proxy_add_forward.c -
> > I can't log X-FORWARDED-FOR in proxy's access_log via
> \"%{X-FORWARDED-FOR}i\"
> >
> >
> > Regards,
> > Oleg
> > _____________________________________________________________
> > Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> > Sternberg Astronomical Institute, Moscow University (Russia)
> > Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
> > phone: +007(095)939-16-83, +007(095)939-23-83
> >
>

	Regards,
		Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83

Re: duplicated IP in X-Forwarded-For

Posted by Issac Goldstand <ma...@beamartyr.net>.
*Grins*  I remember when a couple of us blindly ported
mod_proxy_add_forward.c to Apache 2 just after it was officially declared
"stable", only to test it and discover the same thing for ourselves :-)  The
answer is that it's a standard part of mod_proxy since (I believe) 1.3.26...

Cheers,
  Issac

----- Original Message -----
From: "Oleg Bartunov" <ol...@sai.msu.su>
To: <mo...@perl.apache.org>
Sent: Sunday, April 13, 2003 6:33 PM
Subject: duplicated IP in X-Forwarded-For


> Hi there,
>
> configuring frontend-backend (apache 1.3.27) I noticed last ip in
> X-Forwarded-For is duplicated. Seems (from proxy_http.c), mod_proxy now
> generates X-Forwarded-For itself. Earlier versions ( I checked 1.3.9)
> doesn't generate X-Forwarded-For.
>
> Do we need mod_proxy_add_forward.c now ?
>
> A small problem arises if I don't use mod_proxy_add_forward.c -
> I can't log X-FORWARDED-FOR in proxy's access_log via
\"%{X-FORWARDED-FOR}i\"
>
>
> Regards,
> Oleg
> _____________________________________________________________
> Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
> Sternberg Astronomical Institute, Moscow University (Russia)
> Internet: oleg@sai.msu.su, http://www.sai.msu.su/~megera/
> phone: +007(095)939-16-83, +007(095)939-23-83
>


Re: duplicated IP in X-Forwarded-For

Posted by "Randal L. Schwartz" <me...@stonehenge.com>.
>>>>> "Oleg" == Oleg Bartunov <ol...@sai.msu.su> writes:

Oleg> Do we need mod_proxy_add_forward.c now ?

I've never installed it.  mod_proxy is doing it on its own for recent
versions of apache.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!