jumpgate is a TCP connection forwarder that provides many
enhancements and improvements over the existing programs that do
the same thing.

jumpgate provides an interactive mode that queries the
connected party for the forwarding information it needs. Also,
there is the option to log the entire forwarded session in a
file for later inspection. Furthermore, it can log information
about the forwarded session via the syslog(3) facility.

Output a help message that describes in brief the usage of each
option.

-s

Enable logging of the forwarding information via syslog(3).

-v

Display version number and exit.

-i

Enable interactive mode. When interactive mode is enabled, only
the local port argument is obligatory, since the connected party
is queried about the rest needed forwarding information.

-b local_host

Specify the local IP to bind.

-l local_port

Specify the local port to listen on. A port number or a service
name can be specified.

-r remote_port

Specify the remote port to forward the connection to. A port
number or a service name can be specified.

-a remote_host

Specify the remote host or IP address to forward the connection to.

-f filename

Specify the filename to log the entire forwarded session. In
interactive mode it logs every forwarded connection.

-c number_of_connections

Specify the maximum length of the queue of pending connections.

-L microseconds

Specify the latency in the forwarded connection in microseconds. A
microsecond is 0.000001 seconds.

jumpgate is thoroughly tested on OpenBSD, but should
compile and run without problems on any Unix-like system with
no or trivial modifications. For a list of systems that
jumpgate is known to run on see the README file. If you
furtherly improve it, please send me the diffs.

For example, to forward all the onnections coming to the local machine on
port 4000 to bsd.gr port 21, and log the connected party via syslog(3) one
should invoke jumpgate like this:

jumpgate -s -l 4000 -r 21 -a bsd.gr

In order to wait for connections on port 4000 on the local machine, and then
ask the connected party where to forward the connection, while logging the
entire forwarding session to the jumpgate.log file you should do: