Re: Squid + IP +CGI

From: Andreas Vierengel <avierengel@dont-contact.us>
Date: Mon, 5 Oct 1998 16:42:03 +0200

-----Ursprüngliche Nachricht-----
Von: Gustavo Aguiar <lnx-security@airnet.com.br>
An: squid-users@ircache.net <squid-users@ircache.net>
Datum: Montag, 5. Oktober 1998 16:34
Betreff: Squid + IP +CGI

>Hi all,
>
>I'm having a big problem with squid. At my local net I have same web pages
>tha run cgi scripts. It work's like this:
>
>1- My user come and request a web page.
>2- My script look out for his IP.
>3- My script look up for his username reading a file using the IP found.
>4- My script print the web page for tha specific user.
>
>My problem is:
>
>When I installed squid my script only gets my the IP of my squid server.
>Can I configure squid to don't redirect my user to this page. This way my
>user's browser will be forced to access directly my page.
>
>Is this possible? Can I do this by another way ??
>
enable the forwarded_for option in squid.conf. (usually: forwarded_for on)
Further you should extend your script to scan the X-Forwarded-For variable
in the header.
Check if X-Forwarded-For exists.
if it exist,
  use this ip-address
else
  use your previous routine to determine the ip-adress of the client.

Hope that helps!

--Andy

Dipl.-Inf. (FH)
Andreas Vierengel
Received on Mon Oct 05 1998 - 07:43:17 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:42:20 MST