sshuttle is a lightweight SSH-encrypted VPN. This is a Python based script that allows you to tunnel connections through SSH in a far more efficient way then traditional ssh proxying.
Installing sshuttle Server
You can spin up a new instance with "ubuntu-21.04-x86_64" flavor named "sshuttle_server" on OpenStack, with "default" and "ssh_only" Security Groups attached to it.
Also, attach a Floating IP to this instance so you can ssh into it from outside.
Finally, you'll want to configure the setting for the remote instances in your
SSH configuration file (typically found in
~/.ssh/config). The SSH
configuration file might include entry for your newly create sshuttle server
Host sshuttle HostName 126.96.36.199 User ubuntu IdentityFile ~/.ssh/cloud.key
- Then you can ssh into the sshuttle Server running:
Unlike other VPN servers, for sshuttle you don't need to install anything on the server side. As long as you have an SSH server (with python3 installed) you're good to go.
To connect from a new client
Currently there is no built in support for running sshuttle directly on Microsoft Windows. What you can do is to create a Linux VM with Vagrant (or simply Virtualbox if you like) and then try to connect via that VM. For more details read here
Mac OS X
Install using Homebrew:
brew install sshuttle
OR, via MacPorts
sudo port selfupdate sudo port install sshuttle
sshuttle is available through the package management system on most Linux distributions.
sudo apt-get install sshuttle
sudo yum install sshuttle
It is also possible to install into a virtualenv as a non-root user.
- From PyPI:
virtualenv -p python3 /tmp/sshuttle . /tmp/sshuttle/bin/activate pip install sshuttle
virtualenv -p python3 /tmp/sshuttle . /tmp/sshuttle/bin/activate git clone [https://github.com/sshuttle/sshuttle.git](https://github.com/sshuttle/sshuttle.git) cd sshuttle ./setup.py install
How to Connect
Tunnel to all networks (0.0.0.0/0):
sshuttle -r ubuntu @188.8.131.52 0.0.0.0/0
sudo sshuttle -r email@example.com 0/0
If you would also like your DNS queries to be proxied through the DNS server of the server, you are connected to:
sshuttle --dns -r firstname.lastname@example.org 0/0