Install SShuttle Proxy-Based VPN (Using SSH) on Ubuntu 15.04 & Ubuntu 14.04

sshuttle transparent proxy-based VPN (using ssh) for Linux Ubuntu. Install and use SShuttle on Ubuntu 15.04, Ubuntu 14.04 and Derivatives. sshuttle allows you to create a VPN connection from your machine to any remote server that you can connect to via ssh, as long as that server has python 2.3 or higher. Please note that to work, you must have root access on the local machine, but you can have a normal account on the server.

It’s valid to run sshuttle more than once simultaneously on a single client machine, connecting to a different server every time, so you can be on more than one VPN at once. If run on a router, sshuttle can forward traffic for your entire subnet to the VPN.

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.

Unlike most VPNs, sshuttle forwards sessions, not packets. That is, it uses kernel transparent proxying (iptables REDIRECT rules on Linux, or ipfw fwd rules on BSD) to capture outgoing TCP sessions, then creates entirely separate TCP sessions out to the original destination at the other end of the tunnel.

Install SShuttle on Ubuntu

Run the following command to install sshuttle on Ubuntu and Ubuntu derivative systems:

$ sudo apt-get update
$ sudo apt-get install sshuttle iptables

Once installed, you can start sshuttle by the command given below:

$ sudo sshuttle -r username@sshserver 0/0 -vv

If you wish to get more help or information, you can use the shuttle man (manual) pages (help pages). To do so, run the following command:

$ man sshuttle


  • sudo, su, or logged in as root on your client machine. (The server doesn’t need admin access.)
  • If you use Linux on your client machine: iptables installed on the client, including at least the iptables DNAT, REDIRECT, and ttl modules. These are installed by default on most Linux distributions. (The server doesn’t need iptables and doesn’t need to be Linux.)


  • The most basic use of sshuttle looks like: ./sshuttle -r username@sshserver -vv
  • There is a shortcut for for those that value their wrists ./sshuttle -r username@sshserver 0/0 -vv
  • If you would also like your DNS queries to be proxied through the DNS server of the server you are connect to: ./sshuttle –dns -vvr username@sshserver 0/0

Leave a Reply