Newbie having trouble with proxy setup

View: New views
3 Messages — Rating Filter:   Alert me  

Newbie having trouble with proxy setup

by shakeshuck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm trying to set up a proxy server using privoxy/ipfilter/ipnat. If I set up ipnat.conf with an rdr from the incoming interface to 127.0.0.1, I can get traffic flowing through privoxy.
What I want it to do (contrary to most setups) is to pass the clients' IP address to the webserver. At the moment, the web server is reporting the proxy's address.

I've set -hide-forwarded-for-headers and -hide-from-header in user.actions, but that doesn't make a difference.

Is my problem in privoxy, or something I need to set in ipnat? If anyone can point me in the right direction I'd appreciate it!

Re: Newbie having trouble with proxy setup

by Chuck Swiger-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Jun 8, 2007, at 1:43 PM, shakeshuck wrote:

> I'm trying to set up a proxy server using privoxy/ipfilter/ipnat.  
> If I set up
> ipnat.conf with an rdr from the incoming interface to 127.0.0.1, I  
> can get
> traffic flowing through privoxy.
> What I want it to do (contrary to most setups) is to pass the  
> clients' IP
> address to the webserver. At the moment, the web server is  
> reporting the
> proxy's address.

Of course it is.  :-)

If you redirect or otherwise have clients connect via a proxy, then  
the requests going out to the webservers are going to come from the  
proxy server.  It is likely that privoxy has controls for the X-
Forwarded-For: header, which are normally used by proxies to indicate  
the client machine which made the original request.

--
-Chuck


Re: Newbie having trouble with proxy setup

by shakeshuck :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Chuck Swiger-2 wrote:
On Jun 8, 2007, at 1:43 PM, shakeshuck wrote:
> I'm trying to set up a proxy server using privoxy/ipfilter/ipnat.  
> If I set up
> ipnat.conf with an rdr from the incoming interface to 127.0.0.1, I  
> can get
> traffic flowing through privoxy.
> What I want it to do (contrary to most setups) is to pass the  
> clients' IP
> address to the webserver. At the moment, the web server is  
> reporting the
> proxy's address.

Of course it is.  :-)

If you redirect or otherwise have clients connect via a proxy, then  
the requests going out to the webservers are going to come from the  
proxy server.  It is likely that privoxy has controls for the X-
Forwarded-For: header, which are normally used by proxies to indicate  
the client machine which made the original request.

--
-Chuck
Yes, that's what the -hide-forwarded-for-headers action does. After some rejigging of the action files, I realised I could test this through the web interface in privoxy. X-Forwarded-For is now being set properly.

In the end it appears my confusion lies with php - the suggested parameter to use is REMOTE_ADDR, but this displays the proxy address, not the client. Oh well. Thanks for the input. :-)