VPN using a cheap VPS and sshuttle
It really is awesome, sshuttle basically allows you to browse the web via your VPS, in my case, a VPS from DigitalOcean (sponsored link, as are the others to DigtialOcean). It works on Linux and MacOS.
The GitHub repo explains it better than I can.
Transparent proxy server that works as a poor man’s VPN. Forwards over ssh. Doesn’t require admin. Works with Linux and MacOS. Supports DNS tunneling.
It hasn’t been updated in two years, but, no need to fix or change something that doesn’t need fixing or changing.
So, Why? What’s the point?
I run some Tor relays, one out of my house, thanks Mediacom! ;)
Because of this, many websites block me. Kohl’s, Best Buy, no posting on 4Chan (understandable), even healthcare.gov is blocked. I don’t want to pay for one of the many VPN services. Here’s the message I get at healthcare.gov without sshuttle.
Access Denied
You don’t have permission to access “http://www.healthcare.gov/” on this server.
Reference #18.22ea4d17.1397361569.6bb6afe
VPN’s even provide vital Internet access to those facing government censorship, and worse.
Options
Setting up a secure VPN server on a linux box can be a pain, and definitely takes longer than 5 minutes. sshuttle takes about that, maybe, if you type really slow.
So, for me, when I found sshuttle, my heart was set, the other options didn’t matter.
Setting Up sshuttle On Ubuntu Flavors
Doesn’t get any easier than this. Run the following in a terminal:
sudo apt-get install sshuttle
Now, we’re basically going to SSH to our VPS/server. Again, run this in the terminal:
sshuttle -r username@vps.yourdomain.com 0/0 -vv
After running sshuttle -r username@vps.yourdomain.com 0/0 -vv
you’ll be asked for the root password. And sometimes, for whatever reason, it dies immediately after running the sshuttle
command.
If sshuttle doesn’t work after running it the first time, run it again! It should work the second time. It could be something with the system I’m on, so hopefully this is isolated to me. :)
Setting Up sshuttle On MacOS
When someone donates me a new Macbook Pro 15″, I’ll start writing this stuff. :)
Update: April 21, 2014 Have a look at this post for using sshuttle with MacOS. Comes courtesy of Aaron Bull Schaefer in the comments.
And if I need a VPS?
You can find a cheap VPS easily with Google. DigitalOcean has them for $5/month, which will be plenty sufficient to use specifically for sshuttle.
ChunkHost is another good option for a cheap VPS.
Other Options
Lots of other options have been mentioned in the thread at Hacker News. Check em out. Some really good suggestions that are sometimes even cheaper!
Well, now what?
Work with Me
I'm available for hire and always taking new clients, big and small. Got a project or an idea you'd like to discuss? Startup plan but no developer to make it happen? Just get in touch, I'd love to see if I can help you out!
Leave some Feedback
Got a question or some updated information releavant to this post? Please, leave a comment! The comments are a great way to get help, I read them all and reply to nearly every comment. Let's talk. 😀
Longren.io is proudly hosted by DigitalOcean

5 dollars per month is more than what it costs for a VPN! I only pay 2.5 dollars a month for VPN service and its unlimited.
Excellent point. Perhaps I should update and mention this is really only ideal if you already have a VPS that’s being used for something else.
I’m curious what VPN provider you’re using? I’m still looking for something “real”.
I found https://www.privateinternetaccess.com/ to work well for me. I tested it out for month then converted to their yearly plan.
A lot of people seem to like that provider. I guess I should give them a try.
Am also giving them a try.
Hey!I had thesame problem before. I bumped into one of the best vpn and found ironsocket.It has been my vpn provider for long.check it out.
You mean https://ironsocket.com/ ?
I am very much satisfied with PureVPN – VPN service provider. I can access Netflix without a problem with excellent video quality http://www.purevpn.com/
I’m using http://www.novelvpn.com services for about 2 years and i’m really satisfied with them
can you do anything else with your vpn? Vps gives you the ability to do as much as you want.. host a webserver, setup a voip server, secure encrypted instant messaging server possibilities are endless.
While ssh tunneling is a neat trick, it is not very anonymous since the VPS account is tied to you and your credit card. Unless you can find a VPS provider that accepts Bitcoin or cash or something not traceable back to you. 😉
Good point. This would be handy though if you need a quick solution (like in my case) and have a VPS already setup.
Payment options don’t matter.. They would still have an openssh-server log showing the connections from your real ip address. The real question would be.. How many accounts on the vps servers are sharing the same IP..
I run a docker container with VPN stuff on my cloudatcost server. I only paid $35 one-time for it. This seems cheaper than your droplet solution.
Yah, it may be. There’s lots of other options people have brought up in the Hacker News thread:
https://news.ycombinator.com/item?id=7586775
I didn’t think of all the scenarios, and for something quick, this is a good solution. Create a droplet, use it for an hour or two, kill it.
And sshuttle is excellent for anyone who has a server with SSH access that needs a quick “proxy” solution.
I have a writeup on configuring ssshuttle on OS X, if you’re interested: http://elasticdog.com/2011/12/use-sshuttle-to-keep-safe-on-insecure-wi-fi/
Sweet. I’ll update this post with a link.
Hi Your article is interesting here is ours 🙂 with OpenVPN instead of sshuttle : http://greenycloud.com/easy-vpn-with-digitalocean-and-docker/
Setting up an OpenVPN on a VPS is pretty straightforward with this guy’s shell script:
https://github.com/Nyr/openvpn-install
TY! I’ve been horsing around with openvpn configs for a few days now.. ended up using just the basic pptpd-server.. >.<
No problemo!
Exactly what I needed. It’s like you read my mind 🙂 Thanks!
LimeVPN
delivering http://www.limevpn.com/ with the guarantee of 7-days cash back options, without demanding for
any explanation.
I tried Lime a while back and had horrible performance. Could have just been me, but IMHO, there are many more reliable and just as cheap fast VPN alternatives out there.
Ivacy VPN service has smart features to help you configure VPN according to your purpose with just a few clicks. the most secure USA VPN for only $3.33/mo. https://www.ivacy.com/usa-vpn/
Just heard about Ivacy, recently using PureVPN’s USA VPN service https://www.purevpn.com/servers/usa-vpn
Will compare both with respect to prices and performance than i will surely have a look on Ivacy!
Hmmm this is a very informative article.
How does one optimize security and anonymity for this VPS?
@Tyler Longren It’s an old post, but I still see new replies added, so here’s my experience. I’ve tried out a few VPN services now, but the main problem for me was the restrictions, limitations and logging of activities. A few months ago I was reffered to AirVPN (https://bit.do/airvpn) and tried it by ordering the one month plan, followed by ordering a three month plan, just to be sure it stayed that way. Just recently I’ve “invested” in a yearly plan. The reason for making the choice for AirVPN is actually quite simple: setting it up is so easy (on every device!), the speed is great and best of all there are no traffic limitations, support of p2p and you’ve got a lot more privacy because they don’t log or monitor your online activities. I’m happy with it and at a price of 5 euro per month it’s absolutely not expensive. 🙂
https://uploads.disquscdn.com/images/64fe9d8c1a1220cf1f557a4d96e77fa621e527053893da9a61ba75aa2cdc9648.jpg
I’m using https://fastestvpn.com which is good service at very cheap rate.
Reading this guide on cheap VPNs https://www.bestvpndeals.com/cheap-vpn-service/
Seems there are many VPNs who are selling VPNs in low prices.
Which VPN do you use and why ?
I prefer to use what is known as vpn 大陸 (or a mainland vpn). If these vpns can work despite such a powerful firewall, then they can work anywhere.
FastestVPN is the latest VPN provider in a world of growing cyber-security, founded in 2017 their service has grown to include over 2 millions users world wide. Subscribe to FastestVPN to maximize your experience online.
no matter wherr you are in the world especially in china but there are fastest vpns which can be used. i use purevpn .
I often use these vpns.http://qiangwaikan.com/best-vpn-china/
I am not ready to pay for VPN services since there are free ones who giving what i need for free. I mean i only need vpns for geo restricitons and netflix stream, atlas works perfect so far, servers is not overloaded yet so very good speed.
If you go to China or UAE, I will use ExpressVPN, or you can read this article https://www.5best1s.com/best-vpn-in-china/
watch kissanime online and english subbed. Watch the best kiss anime from the comfort of your living room. kissanime website is free and legal.
In China, I often use these VPNs: https://wallvpn.com/best-vpn-china/
In China, I think ExpressVPN is the best: https://gearvpn.com/expressvpn/
Thanks for this article I ma using this VPN https://plusrew.com/antivirus-e-vpn-qual-e-la-soluzione-migliore-per-proteggere-il-tuo-pc/
If a VPN does not fulfill all the criteria listed above , it is not featured in this report. And when you apply this standard to all the VPNs on the market, there are very few that make the cut. So let’s cut to the chase.https://qiangwaikan.com/gfw/
For many people looking for a VPN, it all comes down to how good a service is at unblocking banned websites/services and getting around TV streaming hurdles.https://qiangup.com/best-vpn-china/
I would like to recommend strongvpn:
One can check https://wallzhihu.com/fanqiang/
I would suggest also using https://dr-wall.com/
Free VPN services may cost nothing but there is usually a good reason for that – it means the provider will be turning a profit in some other way: https://heivpn.com/g/bvc
I appreciate this article, thanks sharing, and if you need some cheap vpn, here it is: https://www.wall-baby.com/best-cheap-vpn/
We actually don’t expect free VPNs to help us get around region blocking from certain apps, sites and streaming services. https://itkumao.com/best-vpn-china/
I would like ExpressVPN, WHY? Check here: https://gevpn.com/vpn-for-china/
The latest free e-book collection in 2022, covering 99% of the resources of the whole network, helping you realize the freedom of reading! View free ebook >https://001vpn.com/free-ebook
推荐使用 PandaVPN, 内置多条香港、澳门、台湾的线路可供楼主使用,而且使用简单>https://vpnmagazine.org/pandavpn-review