[tproxy] EADDRNOTAVAIL from connect, but only sometimes

Ron Parker rparker at movik.net
Mon Jan 11 01:46:58 CET 2010


We are using the tproxy patch for Linux 2.6.24 (Ubuntu 8.0.4).   When placing outgoing connections, we use the original socket address (4-tuple)  in the bind and set SO_REUSEADDR on the socket.   The sequence we are having difficulty with is:

*         Client connects to transparent proxy

*         Transparent proxy connects to remote server

*         Normal data transfer...

*         Remote server closes the connection (but client connection is maintained)

*         Transparent proxy attempts to connect again to remote server using the original 4-tuple (again)

o   Bind succeeds

o   Connect fails with EADDRNOTAVAIL

The original socket is probably in TIME_WAIT at this point.   I thought the SO_REUSEADDR would take care of the problem.  What am I missing here?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.balabit.hu/pipermail/tproxy/attachments/20100110/131ed993/attachment.htm 

More information about the tproxy mailing list