How to install sshuttle Transparent Proxy Server on Ubuntu. sshuttle (proxy-based VPN using ssh) creates a VPN connection from your machine to any remote server that you can connect to via ssh. In simple words, it turn your SSH connection as VPN.
sshuttle proxy server doesn’t need any admin account on the remote system. It supports DNS tunneling and works with Linux and MacOS platforms. Unlike most VPNs, sshuttle forwards sessions, not packets. sshuttle needs that the server has Python 2.3 or higher to work. Also, you must have Root access on the local machine.
You can run sshuttle more than once simultaneously on a single client machine. If sshuttle is run on a router, it can forward traffic for the entire subnet to the VPN.
Install sshuttle on Ubuntu
Open the terminal and run the following command
sudo apt-get update
sudo apt-get install sshuttle
Using sshuttle
sshuttle Syntax is as follow:
sshuttle [options…] [-r [username@]sshserver[:port]] [subnets]
Option details
-r, —remote=[username@]sshserver[:port]
the remote hostname and optional username and ssh port number to use for connecting to the remote server. For example,example.com, testuser@example.com, testuser@example.com:2222, or example.com:2244.
sshuttle Examples
From the machine use the following command:
sudo sshuttle -r username@sshserver 0.0.0.0/0 -vv
Please note that when it starts, sshuttle creates an ssh session to the server specified by the -r option. If -r is omitted, it will start both its client and server locally, which is sometimes useful for testing.
After connecting to the remote server, sshuttle uploads its (python) source code to the remote end and executes it there. Thus, you don’t need to install sshuttle on the remote server, and there are never sshuttle version conflicts between client and server.