Posted In Services

Poor Man’s VPN With a Cheap VPS

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:

Now, we’re basically going to SSH to our VPS/server. Again, run this in the terminal:

After running sshuttle -r [email protected] 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

DigitalOcean
Advertisements
  • 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.

      • Sally Croft

        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/

      • Martin

        I’m using http://www.novelvpn.com services for about 2 years and i’m really satisfied with them

    • Atwas911

      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.

    • Atwas911

      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..

  • John Jelinek IV

    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.

  • Pingback: HackerNews Front Page: I Stayed Up – Tyler Longren()

  • Aaron Bull Schaefer

    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/

  • paimpozhil

    Hi Your article is interesting here is ours 🙂 with OpenVPN instead of sshuttle : http://greenycloud.com/easy-vpn-with-digitalocean-and-docker/

  • Trey Witteried

    Setting up an OpenVPN on a VPS is pretty straightforward with this guy’s shell script:

    https://github.com/Nyr/openvpn-install

    • Atwas911

      TY! I’ve been horsing around with openvpn configs for a few days now.. ended up using just the basic pptpd-server.. >.<

      • Trey Witteried

        No problemo!

  • janifar soloman

    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.

  • Rene Stitt

    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/

  • Pingback: Buy Vps In Le Mans – Web Hosting()

  • Pingback: BitTorrent Protection, And a Look at the New Put.io()

  • austinmoorebt

    Hmmm this is a very informative article.

  • Pingback: Vps Cheap Yearly – Fast Server()

  • How does one optimize security and anonymity for this VPS?

  • vvanasperen

    @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

  • Pingback: Buy Vps In Irbit – Web Hosting()

  • Pingback: Buy Vps In Eudlo – Virtual Private Server()

  • Pingback: Mediacom Personal Web Hosting | Great Value Webhosting()

  • Zoya

    I’m using https://fastestvpn.com which is good service at very cheap rate.

  • Julie Mone

    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 ?