1UREDIR(1) BSD General Commands Manual UREDIR(1)
2
4 uredir — UDP port redirector
5
7 uredir [-hinsv] [-I ID] [-l LVL] [-t SEC] [[SRC]:PORT] [DST]:PORT
8
10 uredir is a small tool to redirect UDP traffic. It can be used as a poor
11 man's filtering tool, e.g. for small multihomed embedded systems without
12 a built-in firewall.
13
14 uredir forwards packets to a specified destination remembering the
15 sender's address, any packets received from the destination are in turn
16 forwarded to the sender.
17
18 When uredir is launched from inetd(8) it does not immediately exit when
19 the first reply has been forwarded. Instead it lingers for three (3)
20 seconds in case more requests are received, e.g. in the case of an SNMP
21 walk. This helps conserve precious system resources, useful in particu‐
22 lar on embedded systems.
23
24 For a TCP port redirector, try redir(1), which now has the same main‐
25 tainer as uredir(1).
26
28 -h Print a summary of the options and exit
29
30 -i Run in inetd mode, read data from stdin. Implies -n, always runs
31 in foreground
32
33 -I ID Identity, tag syslog messages with the ID name, default: process
34 name
35
36 -l LVL Set log level: none, err, info, notice (default), debug
37
38 -n Run in foreground, do not detach from controlling terminal
39
40 -s Use syslog, even if running in foreground, default w/o -n
41
42 -t SEC Set timeout to SEC seconds for connections, default 3
43
44 -v Show program version
45
46 [SRC]:PORT
47 Source, or outer/public, IP and UDP port to bind to, the SRC can
48 be left out to default to 0.0.0.0. Must not be set when running
49 in inet mode, -i
50
51 [DST]:PORT
52 Destination, or inner/private, IP and UDP port to redirect to
53
55 This simple UDP proxy example forwards inbound DNS requests on any inter‐
56 face to an external DNS server on 192.168.0.1.
57
58 uredir :53 192.168.0.1:53
59
60 To run uredir in inetd mode, e.g. to redirect SNMP requests, and timeout
61 after 5 sec, try the following. Runs in foreground, as required for in‐
62 etd services, and uses syslog for logging:
63
64 snmp dgram udp wait root uredir -it 5 127.0.0.1:16161
65
66 Syntax may vary between different inetd implementations and UNIX distri‐
67 butions.
68
70 redir(1) inetd(8)
71
73 Use the project's GitHub page to file bug reports, feature requests or
74 patches -- preferably as pull requests
75 ⟨https://github.com/troglobit/uredir⟩
76
78 uredir used to be based on udp_redirect by Ivan Tikhonov, but is today
79 based on youdp by Tobias Waldekranz. Current maintainer is Joachim Nils‐
80 son.
81
82BSD 17 April, 2016 BSD