Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
How do I route my internet through a SSH tunnel?

I just got a new laptop and put Ubuntu on it as a good way to force myself to learn Linux. This laptop will be going with me to school, work, the local coffee shop, etc. So I wanted a secure way to browse without pesky filters and worrying about the open wifi.

I setup a simple autossh script to run in cron on startup, but I want to route all my traffic, not just web traffic pointed to the local loop back. That way I don't need to worry about my chats etc. I've seen some other posts like this, but they had different requirements to meet, none of which I am limited by; so I'm curious if there is a better option then SSH (which seems to have quiet a bit of overhead).

So the question, what is the best option for tunneling all traffic (securely of course) from an Ubuntu desktop to an Ubuntu server? One preferably with an example ;)

share|improve this question

marked as duplicate by Eliah Kagan, John S Gruber, con-f-use, SirCharlo, izx Aug 21 '12 at 20:31

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

up vote 3 down vote accepted

ssh tunnels are the wrong tool for this; you want a VPN (or possibly TOR, but probably not if you only care about a single fixed endpoint server).

share|improve this answer
How would I set up a VPN server on my Ubuntu Server? – Ben May 5 '12 at 2:39
Did you follow the link on "VPN"? The Ubuntu Wiki gives example installation recipes for a number of configurations and versions; for your setup you probably want OpenVPN (VPNC), not PPTP or Cisco. – geekosaur May 5 '12 at 3:16
My misunderstanding, I thought those were for the client, not server; I'll give them a shot, thanks. – Ben May 5 '12 at 3:46

You can use sshuttle.

While doing it over SSH isn't the greatest idea, it works, and I've lost count of how many times I've used it when I can't get into my VPN.

This is how to get it set up:

First, make sure git is installed by running:

sudo apt-get install git

Then, clone the code from github:

git clone git://

You'll need root or sudo access, and python needs to be installed.

Then, do this:

cd sshuttle

./sshuttle -r username@sshserver -vv

Also, to make it easier to access everything via ssh, you'll want to set up DynDNS or something similar.

Best of luck, and safe browsing!

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.