NAME
reslirp-tunnel - A script to set up a reSLIRP tunnel over SSH for remote connections
SYNOPSIS
reslirp-tunnel [options] [remote_host]
DESCRIPTION
reslirp-tunnel sets up a reSLIRP tunnel to a specified remote host using SSH. It allows users to configure various networking options such as remote network settings, logging preferences, and more.
OPTIONS
- -C, --reslirp-cmd, --reslirp-command command
-
Specify the reslirp command to be used.
By default, it uses c<C:\Program Files\reSLIRP\reslirp.ext>. When the remote Operating System is Windows and
reslirp
otherwise. - -s, --ssh-cmd, --ssh-command command
-
Specify the SSH command to be used.
- -R, --remote-os os
-
Specify the remote operating system.
When not given,
reslirp-tunnel
would try to autodetect the remote Operating System running some commands over the SSH channel. - -S, --remote-shell shell
-
Specify the remote shell.
reslirp-tunnel
also tries to autodetect the remote shell when it is not explicitly given using this flag. - -n, --remote-network network
-
Specify the remote network (defaults to 10.0.2.0/24).
- -m, --remote-netmask netmask
-
Specify the remote netmask (defaults to 255.255.255.0).
- -g, --remote-gw gateway
-
Specify the remote gateway (defaults to 10.0.2.2).
- -d, --remote-dns dns
-
Specify the remote DNS (defaults to 10.0.2.3).
- -a, --local-ip ip
-
Specify the local IP (defaults to 10.0.2.30).
- -i, --tap-device device
-
Specify the tap device.
By default,
reslirp-tunnel
will use the first tap device available. - -s, --ssh-arg arg
-
Specify additional SSH arguments.
- -r, --reslirp-arg arg
-
Specify additional reslirp arguments.
- -E, --log-to-stderr
-
Log to standard error.
- -L, --log-file file
-
Specify the log file (by default logs to a file in ~/.local/state/reslirp-tunnel/logs).
- -D, --log-level level
-
Specify the log level (debug, info, warn, error).
- -l, --remote-user user
-
Specify the remote user used for logging in.
- -p, --remote-port port
-
Specify the remote port (defaults to 22).
- -h, --route-host, --route-host-local host
- -H, --route-host-dns host
- -W, --route-host-ssh host
-
When one or more hosts are given using any of these options, the script changes the local network configuration so that traffic going to the given machines is routed through the reSLIRP tunnel.
The difference between these options is how the script resolves the hostnames:
- --route-host, --route-host-local resolves the host locally using the OS resolver.
- --route-host-dns resolves the host using the remote DNS provided by reSLIRP which forwards the request to any configured DNS server. Though, note that this doesn't usually work when the remote hosts runs Windows.
- --route-host-ssh resolves the host using commands run on the remote machine through the SSH connection. Effectively, this approach resolves the names using the resolver configuration in the remote machine.
The addreses are resolved at launch time and then cached in a local DNS server set up by
reslirp-tunnel
. The configuration ofsystemd
resolver is also adjusted so that the DNS service is used for those hosts.Finally, a set of IP rules are also added for directing the traffic through the tunnel.
- -f, --run-in-foreground
-
Run in foreground.
- --dont-close-stdio
-
Don't close stdio.
reslirp-tunnel -C reslirp -s ssh -R linux -n 10.0.2.0/24
AUTHOR
This script was written by the authors of App::ReslirpTunnel.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 317:
Unknown directive: =HEAD1