[tproxy] tproxy4, kernel 2.6.22 and squid-2.6.stable13

Ming-Ching Tiew mingching.tiew at redtone.com
Tue Dec 18 02:31:09 CET 2007


From: "Andrey Luzgin" <andrey at icomsw.com>


> We tried to modify forward.c in squid source like this:
> 
> #if LINUX_TPROXY
>             /* Here it falls */
>                 if (bind(fd, (struct sockaddr *) &to_addr,
> sizeof(to_addr)) == -1) {
>                     debug(20, 1) ("tproxy fail to bind\n");
>                 }
>                 /*
> 
> We receive the message "tproxy fail to bind". 
> -- 

This is likely due to you have binded to another IP earlier.

In tproxy2, you have to set up 'tcp_outgoing_address' before
tproxy will work. However, when using tproxy4, you 
should change of source code to ignore 'tcp_outgoing_address' 
setting ( ie don't bind to this IP at all ! ) and just bind straight
to the HTTP requesters IP.

I haven't quite tested it, but perhaps you can remove your
tcp_outgoing_address setting in squid.conf. That might provide
a fast work around.


Cheers.



More information about the tproxy mailing list