Skip to content


Folders and files

Last commit message
Last commit date

Latest commit



8 Commits

Repository files navigation


Labtunnel uses systemd and ssh to make managing SOCKS5 proxies easy. It is based on a project by the same name, which in turn is based on another project. It is indended for Linux workstations using the Gnome Desktop Environment. But it could easily be modified to work with other DEs.


After cloning the repo:

$ cd labtunnel
$ sudo -E make install

You will now have a utility called labtunnel which will make use of code that has been installed to ~/.local/opt/labtunnel.

Getting Started

First off, you'll want to make sure you have at least one server you can connect to securely using SSH without passwords, to act as your bastion host. You may have an ~/.ssh/config file that looks like this:

	User bob
	IdentityFile ~/.ssh/id_rsa

    User alice
    IdentityFile ~/.ssh/id_rsa

where "bastion1" and "bastion2" are servers you want available as SOCKS5 proxies. All configuration should be in the config files so that to SSH in would be a simple ssh bastion1. This is because labtunnel treats the hostname as a systemd instance name unit specifier.

Here's how you would direct traffic through the bastion1 server:

$ labtunnel enable bastion1 # to enable
$ labtunnel start bastion1 # start the tunnel
$ labtunnel on # to tell your desktop environment that you want all network traffic to use that tunnel
$ firefox # checking your public IP is the easiest way to see if your tunnel is being used

Under the hood


All subcommands live in the ./bin/ folder. Simply adding a new file in there is sufficient for adding new functionality. Ideally Labtunnel could offer support for DEs other than Gnome, and possibly support Mac OS too. PRs welcome.