Sign up ×
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.


locked by HopelessN00b Feb 17 at 16:03

This question exists because it has historical significance, but it is not considered a good, on-topic question for this site, so please do not use it as evidence that you can ask similar questions here. This question and its answers are frozen and cannot be changed. More info: help center.

closed as off-topic by HopelessN00b Feb 17 at 16:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the 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

This is a good link to understand the concept and get started in 5min – Maxim Veksler Jul 7 '11 at 17:31

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


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.


on your client:

ssh -ND 5555

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

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

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



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

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