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:

sudo apt-get install sshuttle

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

sshuttle -r [email protected] 0/0 -vv

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

37 thoughts on “Poor Man’s VPN With a Cheap VPS

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

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

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

      0
  1. 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. ๐Ÿ˜‰

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

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

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

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

      0
  3. @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

    0

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.