<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Gllug] Squid</TITLE>
</HEAD>
<BODY>
<BR>
<BR>

<P><FONT SIZE=2>> -----Original Message-----</FONT>
<BR><FONT SIZE=2>> From: John Hearns [<A HREF="mailto:john.hearns@cern.ch">mailto:john.hearns@cern.ch</A>]</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> The lazy persons way of doing this would be to configure your browser</FONT>
<BR><FONT SIZE=2>> so that it doesn't proxy accesses to the local address (I think).</FONT>
<BR><FONT SIZE=2>> But of course you may be wanting to test squid, in qhich case</FONT>
<BR><FONT SIZE=2>> I am talking twaddle.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Remember that the chief virtues of a programmer and laziness </FONT>
<BR><FONT SIZE=2>> and hubris.</FONT>
</P>

<P><FONT SIZE=2>Having just finished reading the "basic TCP/IP Howto's" I think that there are a couple of ways to do it at least in theory maybe not in practice. </FONT></P>

<P><FONT SIZE=2>1. I can use iptables to redirect the request to "192.168.10.1:80" to "127.0.0.1:80" by putting the line before the one that redirects to squids 3128 port. I am unable to redirect it back to 192.168.10.1 or we could end up in a bit of a loop.</FONT></P>

<P><FONT SIZE=2>2. I can get squid to send local IP address requests to the local box.</FONT>
<BR><FONT SIZE=2>3. Uninstall squid and iptables and say "fsck it!".</FONT>
</P>

<P><FONT SIZE=2>The problem! I have tried number 1 am unsure if 2 is viable and am not mad enough to try 3 and go online. Hence the reason for my post. I have RTFM as well as the "Basic TCP/IP Howto's"</FONT></P>

<P><FONT SIZE=2>The offending rule that sends to squid is. </FONT>
</P>

<P><FONT SIZE=2>iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128</FONT>
</P>

<P><FONT SIZE=2>I want to put a rule before this that will redirect to the local port. What I would like to know is this the correct way to go about it and is it possible. It seems logical enough to me I just havn't got it working yet.</FONT></P>

<P><FONT SIZE=2>Harry</FONT>
</P>
<BR>
<BR>
<BR>
<BR>

<CODE><FONT SIZE=3><BR>
<BR>
*************************************************************************************<BR>
COLT Telecommunications<BR>
Registered in England No. 2452736<BR>
Registered Office: Bishopsgate Court, 4 Norton Folgate, London E1 6DQ<BR>
Tel. +44 20 7390 3900<BR>
<BR>
This message is subject to and does not create or vary any contractual<BR>
relationship between COLT Telecommunications, its subsidiaries or <BR>
affiliates ("COLT") and you. Internet communications are not secure<BR>
and therefore COLT does not accept legal responsibility for the<BR>
contents of this message.  Any view or opinions expressed are those of<BR>
the author. The message is intended for the addressee only and its<BR>
contents and any attached files are strictly confidential. If you have<BR>
received it in error, please telephone the number above. Thank you.<BR>
*************************************************************************************<BR>
</FONT></CODE>
</BODY>
</HTML>