Blob


1 # lstun -- lazy ssh tunnel
3 lstun is a simple utility to lazily (on demand) spawn a ssh tunnel to
4 a remote machine and optionally kill it after some time of inactivity.
6 The only dependency is libevent and openssh.
8 To compile it just run
10 $ ./configure
11 $ make
12 # make install # eventually
14 The build can be customized by passing arguments to the configure
15 script or by using a `configure.local` file; see `./configure -h` and
16 [`configure.local.example`](configure.local.example) for more
17 information.
19 The `configure` script can use pkg-config if available to find the
20 flags for libevent. To disable the usage of it, pass
21 `PKG_CONFIG=false` to the configure script.
23 For Linux users with libbsd installed, the configure script can be
24 instructed to use libbsd instead of the bundled compats as follows:
26 CFLAGS="$(pkg-config --cflags libbsd-overlay)" \
27 ./configure LDFLAGS="$(pkg-config --libs libbsd-overlay)"
30 ### Usage
32 ```
33 usage: lstun [-dv] -B sshaddr -b addr [-t timeout] destination
34 ```
36 Check out the [manpage](lstun.1) for the usage.
39 ### Motivation
41 It was written to forward lazily all the traffic on the local port
42 2525 to a remote port 25, thus using ssh as some sort of
43 authentication.
45 The need for the "lazy" opening and closing of the tunnel is to avoid
46 wasting resources when not needed.