<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/3.16.1">
</HEAD>
<BODY>
I not the programmer, i system administrator of our firm. Our programmer makes variations to a code of Squid. We shall complete all and we shall publish here changes. :-)<BR>
<BR>
В Втр, 18/12/2007 в 09:31 +0800, Ming-Ching Tiew пишет:
<BLOCKQUOTE TYPE=CITE>
<PRE>
<FONT COLOR="#000000">From: "Andrey Luzgin" <<A HREF="mailto:andrey@icomsw.com">andrey@icomsw.com</A>></FONT>
<FONT COLOR="#000000">> We tried to modify forward.c in squid source like this:</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> #if LINUX_TPROXY</FONT>
<FONT COLOR="#000000">> /* Here it falls */</FONT>
<FONT COLOR="#000000">> if (bind(fd, (struct sockaddr *) &to_addr,</FONT>
<FONT COLOR="#000000">> sizeof(to_addr)) == -1) {</FONT>
<FONT COLOR="#000000">> debug(20, 1) ("tproxy fail to bind\n");</FONT>
<FONT COLOR="#000000">> }</FONT>
<FONT COLOR="#000000">> /*</FONT>
<FONT COLOR="#000000">> </FONT>
<FONT COLOR="#000000">> We receive the message "tproxy fail to bind". </FONT>
<FONT COLOR="#000000">> -- </FONT>
<FONT COLOR="#000000">This is likely due to you have binded to another IP earlier.</FONT>
<FONT COLOR="#000000">In tproxy2, you have to set up 'tcp_outgoing_address' before</FONT>
<FONT COLOR="#000000">tproxy will work. However, when using tproxy4, you </FONT>
<FONT COLOR="#000000">should change of source code to ignore 'tcp_outgoing_address' </FONT>
<FONT COLOR="#000000">setting ( ie don't bind to this IP at all ! ) and just bind straight</FONT>
<FONT COLOR="#000000">to the HTTP requesters IP.</FONT>
<FONT COLOR="#000000">I haven't quite tested it, but perhaps you can remove your</FONT>
<FONT COLOR="#000000">tcp_outgoing_address setting in squid.conf. That might provide</FONT>
<FONT COLOR="#000000">a fast work around.</FONT>
<FONT COLOR="#000000">Cheers.</FONT>
<FONT COLOR="#000000">_______________________________________________</FONT>
<FONT COLOR="#000000">tproxy mailing list</FONT>
<FONT COLOR="#000000"><A HREF="mailto:tproxy@lists.balabit.hu">tproxy@lists.balabit.hu</A></FONT>
<FONT COLOR="#000000"><A HREF="https://lists.balabit.hu/mailman/listinfo/tproxy">https://lists.balabit.hu/mailman/listinfo/tproxy</A></FONT>
</PRE>
</BLOCKQUOTE>
<TABLE CELLSPACING="0" CELLPADDING="0" WIDTH="100%">
<TR>
<TD>
-- <BR>
Andrey Luzgin <<A HREF="mailto:andrey@icomsw.com">andrey@icomsw.com</A>><BR>
I-com software
</TD>
</TR>
</TABLE>
</BODY>
</HTML>