feel free to email me at

udp_redirect - linux udp port forward (redirect)

A small tool to redirect udp packets to another destination. I used it to test VoIP tool looping back RTP port.

In a normal mode udp_redirect forwards packets to a specified destination and remember a sender's address.

Packets received from a specified destination are sent back to a remembered sender. It is mostly what symmetric NAT do.

In an echo mode udp_redirect forwards packets back to a sender.

Tested and used on Linux but should be working on any POSIX system.

Version: 2008-11-09

Download: udp_redirect.c (1k)

Build: gcc -o udp_redirect udp_redirect.c


./udp_redirect our-ip our-port send-to-ip send-to-port
./udp_redirect our-ip our-port (echo mode)


./udp_redirect 53 53
./udp_redirect 7