1 b542d800 2021-11-20 op .\" Copyright (c) 2021 Omar Polo <op@omarpolo.com>
3 b542d800 2021-11-20 op .\" Permission to use, copy, modify, and distribute this software for any
4 b542d800 2021-11-20 op .\" purpose with or without fee is hereby granted, provided that the above
5 b542d800 2021-11-20 op .\" copyright notice and this permission notice appear in all copies.
7 b542d800 2021-11-20 op .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 b542d800 2021-11-20 op .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 b542d800 2021-11-20 op .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 b542d800 2021-11-20 op .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 b542d800 2021-11-20 op .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 b542d800 2021-11-20 op .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 b542d800 2021-11-20 op .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 8947862e 2021-11-23 op .Dd $Mdocdate: November 23 2021$
19 b542d800 2021-11-20 op .Nd lazy ssh tunnel
24 8947862e 2021-11-23 op .Fl B Ar sshaddr
26 b542d800 2021-11-20 op .Op Fl t Ar timeout
27 b542d800 2021-11-20 op .Ar destination
29 b542d800 2021-11-20 op .Sh DESCRIPTION
31 b542d800 2021-11-20 op binds the local
33 b542d800 2021-11-20 op and lazily spawns an
35 b542d800 2021-11-20 op instance to forward the traffic to a remote end.
39 b542d800 2021-11-20 op from the last client activity, the ssh tunnel is closed.
43 b542d800 2021-11-20 op tunnel is established by running
46 8947862e 2021-11-23 op .Fl L Ar sshaddr
48 b542d800 2021-11-20 op .Ar destination .
51 b542d800 2021-11-20 op The arguments are as follows:
52 b542d800 2021-11-20 op .Bl -tag -width Ds
55 8947862e 2021-11-23 op .Oo Ar bind_address : Oc
56 8947862e 2021-11-23 op .Ar port : host : hostport
63 b542d800 2021-11-20 op .It Fl b Ar addr
64 b542d800 2021-11-20 op Where to bind the local socket.
65 b542d800 2021-11-20 op A port number or the tuple host:port.
67 3376f40a 2021-11-25 op Do not daemonize.
69 3376f40a 2021-11-25 op will run in the foregound and log to
71 b542d800 2021-11-20 op .It Fl t Ar timeout
72 534c038e 2021-11-25 op Number of seconds after the last client shutdown to kill the ssh
74 85b8fe26 2021-11-25 op Set to zero to keep the tunnel open indefinitely.
75 dd30c95b 2021-12-01 op Defaults to 600
76 dd30c95b 2021-12-01 op .Pq ten minutes .
78 3376f40a 2021-11-25 op Produce more verbose output.
81 68d87340 2021-11-25 op Forward traffic on the port 2525 to the remote port 25
82 68d87340 2021-11-25 op .Po note that 2526 is binded by ssh while
84 68d87340 2021-11-25 op listens on 2525 and forwards the traffic
86 68d87340 2021-11-25 op .Bd -literal -offset indent
87 68d87340 2021-11-25 op $ lstun -B 2526:localhost:25 -b 2525 example.com
93 b542d800 2021-11-20 op utility was written by
94 b542d800 2021-11-20 op .An Omar Polo Aq Mt op@omarpolo.com .
96 4caeea22 2021-11-21 op Currently it's impossible to pass flags to the
99 4caeea22 2021-11-21 op This is especially painful when you need to use, say, a jump host.