[tproxy] TPROXY for a UDP listener

KOVACS Krisztian hidden at balabit.hu
Thu Oct 13 08:51:43 CEST 2011


Hi,

On Wed, 2011-10-12 at 14:15 -0400, Ramin Dousti wrote:
> I have a linux router that would receive UDP packets through a GRE
> tunnel that is not destined for the router itself. I'm hosting a UDP
> listener that is supposed to intercept these UDP packets and reply to
> them accordingly. What I'm seeing is that the UDP replies (sent by
> this intercepting process) are being source by the real IP address of
> the linux box itself and of course the remote end just drops these
> replies since they do not conform to the src/dst IP and port of the
> originating socket. So basically my UDP listener does get the UDP
> requests but the replies have an incorrect src/port.
> 
> I followed this documet:for the setup:
> 
> http://www.mjmwired.net/kernel/Documentation/networking/tproxy.txt

What kind of software are you running on the router that is supposed to
reply to the UDP packets?

For the setup you described to work, your UDP listener software has to
be modified to explicitly request the kernel to send the reply packets
from the proper source IP (the original destination IP in the packets).

I'd expect the very same behaviour that you've described if you're
running this setup with software lacking explicit support for
transparent operation.

-- 
KOVACS Krisztian




More information about the tproxy mailing list