Your company here — click to reach over 10,000 unique daily visitors

uredir - Man Page

UDP port redirector


uredir[-hinsv] [-I ID] [-l LVL] [-t SEC] [[SRC]:PORT] [DST]:PORT


uredir is a small tool to redirect UDP traffic. It can be used as a poor man's filtering tool, e.g. for small multihomed embedded systems without a built-in firewall.

uredir forwards packets to a specified destination remembering the sender's address, any packets received from the destination are in turn forwarded to the sender.

When uredir is launched from inetd(8) it does not immediately exit when the first reply has been forwarded. Instead it lingers for three (3) seconds in case more requests are received, e.g. in the case of an SNMP walk. This helps conserve precious system resources, useful in particular on embedded systems.

For a TCP port redirector, try redir(1), which now has the same maintainer as uredir(1).



Print a summary of the options and exit


Run in inetd mode, read data from stdin. Implies -n, always runs in foreground


Identity, tag syslog messages with the ID name, default: process name

-l LVL

Set log level: none, err, info, notice (default), debug


Run in foreground, do not detach from controlling terminal


Use syslog, even if running in foreground, default w/o -n

-t SEC

Set timeout to SEC seconds for connections, default 3


Show program version


Source, or outer/public, IP and UDP port to bind to, the SRC can be left out to default to Must not be set when running in inet mode, -i


Destination, or inner/private, IP and UDP port to redirect to


This simple UDP proxy example forwards inbound DNS requests on any interface to an external DNS server on

uredir :53

To run uredir in inetd mode, e.g. to redirect SNMP requests, and timeout after 5 sec, try the following. Runs in foreground, as required for inetd services, and uses syslog for logging:

snmp dgram udp wait root uredir -it 5

Syntax may vary between different inetd implementations and UNIX distributions.

See Also

redir(1) inetd(8)


Use the project's GitHub page to file bug reports, feature requests or patches -- preferably as pull requests ⟨https://github.com/troglobit/uredir⟩


uredir used to be based on udp_redirect by Ivan Tikhonov, but is today based on youdp by Tobias Waldekranz. Current maintainer is Joachim Nilsson.

Referenced By


17 April, 2016