Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have EC2 Ubuntu server which I would like to use as VPN gateway, I'm looking to do geoip targeting test and using a machine with US IP is a must.

My client machine is Ubuntu 11.04.

Any ideas, it doesn't have to be scalable or highly reliable - Quick and dirty would be great.

Please note that I'm looking mainly to do HTTP access so a working SOCKS5 proxy would be just as good.

share|improve this question

6 Answers 6

up vote 2 down vote accepted

What you're looking for is sshuttle. Here's a quick guide to get started.

From the readme:

The most basic use of sshuttle looks like: ./sshuttle -r username@sshserver -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

share|improve this answer
This is a good link to understand the concept and get started in 5min apenwarr.ca/log/?m=201005#02 –  Maxim Veksler Jul 7 '11 at 17:31

on your client:

ssh -ND 5555 remoteserver.com

and then use localhost:5555 in your browser as a SOCKS5 server.

share|improve this answer
This is quick and dirty, yes, but it's not really a VPN. Just port forwarding. It's OK here though because the author said he was fine with a SOCKS5 solution. Just saying. –  joechip Jul 3 '11 at 4:49



share|improve this answer
openvpn installation is not so simple, at least not the last time I've tried to do this. I'm not looking to spend more then 2h on this. –  Maxim Veksler Jun 30 '11 at 14:08

..if you don't want to ssh, N2N is quite good and there are some ubuntu packages in the repositories.

share|improve this answer

You can use ssh directly with the -w option, which establishes a full-blown VPN from the client to the remote server. This VPN can be created on layer 2 (bridging) or layer 3 (routing) at your choice. It uses the tun/tap devices on both ends. Being a TCP-based VPN, it is not really suitable to streaming traffic (VoIP, video, etc.), but it otherwise works very well.

This solution seems similar to the one that Handyman5 recommended (sshuttle). AFAIK sshuttle is technically different, but there's not much documentation for it so it could well be just a wrapper for the original ssh -w option.

share|improve this answer

Privoxy worked great for me, even without the SSH tunneling. I was running in 5 min, all I needed to do is configure

listen-address  *:8118

instead of

listen-address  localhost:8118

(and make sure the security groups, aka firewall rules allow access only from the office).

and then do /etc/init.d/privoxy restart


Forgot to post the link to the original article http://www.plenz.com/tunnel-everything

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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