1 .\" $NetBSD: tftp-proxy.8,v 1.3 2009/03/21 00:15:54 perry Exp $
2 .\" $OpenBSD: tftp-proxy.8,v 1.2 2007/05/31 19:19:41 jmc Exp $
4 .\" Copyright (c) 2005 joshua stein <jcs@openbsd.org>
6 .\" Redistribution and use in source and binary forms, with or without
7 .\" modification, are permitted provided that the following conditions
10 .\" 1. Redistributions of source code must retain the above copyright
11 .\" notice, this list of conditions and the following disclaimer.
12 .\" 2. Redistributions in binary form must reproduce the above copyright
13 .\" notice, this list of conditions and the following disclaimer in the
14 .\" documentation and/or other materials provided with the distribution.
15 .\" 3. The name of the author may not be used to endorse or promote products
16 .\" derived from this software without specific prior written permission.
18 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
19 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
20 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
21 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
22 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
23 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 .Nd Internet Trivial File Transfer Protocol proxy
41 is a proxy for the Internet Trivial File Transfer Protocol invoked by
45 TFTP connections should be redirected to the proxy using the
48 command, after which the proxy connects to the server on behalf of
51 The proxy establishes a
56 facility to rewrite packets between the client and the server.
57 Once the rule is established,
59 forwards the initial request from the client to the server to begin the
65 NAT state is assumed to have been established and the
67 rule is deleted and the program exits.
68 Once the transfer between the client and the server is completed, the
69 NAT state will naturally expire.
71 Assuming the TFTP command request is from $client to $server, the
72 proxy connected to the server using the $proxy source address, and
75 adds the following rule to the anchor:
76 .Bd -literal -offset indent
77 rdr proto udp from $server to $proxy port $port -\*(Gt $client
80 The options are as follows:
83 Log the connection and request information to
86 Number of seconds to wait for the data transmission to begin before
91 The default is 2 seconds.
94 To make use of the proxy,
96 needs the following rules.
97 The anchors are mandatory.
98 Adjust the rules as needed for your configuration.
101 .Bd -literal -offset indent
102 nat on $ext_if from $int_if -\*(Gt ($ext_if:0)
104 no nat on $ext_if to port tftp
106 rdr-anchor "tftp-proxy/*"
107 rdr on $int_if proto udp from $lan to any port tftp -\*(Gt \e
111 In the filter section, an anchor must be added to hold the pass rules:
112 .Bd -literal -offset indent
113 anchor "tftp-proxy/*"
117 must be configured to spawn the proxy on the port that packets are
118 being forwarded to by
123 .Bd -literal -offset indent
124 127.0.0.1:6969 dgram udp wait root \e
125 /usr/libexec/tftp-proxy tftp-proxy
138 .Pa /var/chroot/tftp-proxy