Poor Man’s VPN With a Cheap VPS

SONY DSC

sshuttle is what makes me love the Internet

It really is awesome, sshuttle basically allows you to browse the web via your VPS, in my case, a DigitalOcean VPS. 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 my. 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. :)

And if I need a VPS?

You can find a VPS easily with Google. DigitalOcean has them for $5/month, which will be plenty sufficient to use specifically for sshuttle.

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!

Easily Deploy An Open Source Team Chat App to Heroku

lets-chat

Self-hosted chat app for small teams

Let’s Chat is a pretty cool piece of software (no, it’s actually fucking awesome). The ability to run the app on Heroku just makes it that much nicer.

Setting it up on Heroku is quite easy. You can see it running on Heroku at http://yell.longren.io. There’s no admin user, so anyone can register and create their own rooms.

Files can also be posted to rooms, but an Amazon S3 bucket is required for that feature to work. Although, other file storage options are being looked into. Another neat feature is automatic transcript creation. There’s a transcript screenshot in the gallery below.

Prepare Let’s Chat

Open up a terminal and clone the Let’s Chat Git repository:

That will make a local clone of Let’s Chat in the lets-chat folder. Go into that folder, with cd lets-chat.

1. Copy settings.js.sample to settings.js, like so:

2. Remove settings.js from the .gitignore file. Just open .gitignore in your favorite text editor and remove the line containing settings.js.

3. Make any changes to settings.js that you’d like. This is where you’d specify your Amazon S3 credentials to allow storing files in a bucket.

Deploy To Heroku

We’ll be using heroku-app-name as the name of our Heroku app. So you’ll obviously need to change instances of heroku-app-name in the commands that follow.

1. Add a Heroku remote to your newly cloned repository:

2. Add the MongoLab Heroku addon:

3. Get the Mongo URL. Executing the following will give you the Mongo URL, which you’ll need below.

You’ll see some output similar to this:

The Mongo URL is the part that starts with mongodb://.

4. Now, we need to set the Mongo URL:

You’ll want to change the DATABASE_URL variable to the Mongo URL specific to your app.

6. All that’s left is to commit and push to Heroku. You should still be in the lets-chat folder, so, make a git commit! You’ll have to anyway, before you can push to Heroku.

7. Now we can finally push this to Heroku!

Visit your Heroku app URL in your web browser and you should be greeted with a screen that looks similar to the featured image for this post. Some basic screenshots can be seen below!

If you run into any issues or find something I have incorrect, please let me know. You could also see if your problem has already been addressed on GitHub.

This is the steps I took to get Let’s Chat working on Heroku. It’s possible that the project developers will streamline this process in the future. But for now, this is a very easy solution to hosting on Heroku.

Aggregate System and Application Logs with Papertrail

papertrail

Frustration-free log management

I’ve been using Papertrail for a few months now, and absolutely love it. Being able to search logs across all my servers at once is crazy nice.

I can even get alerts when someone logs in via SSH, which, by itself, has made Papertrail well worth it.

A non-production server was compromised, due to a since-rectified configuration issue. Papertrail notified me almost immediately, allowing for immediate action to be taken.

There’s a variety of pricing plans, and there’s even a free for life plan, which includes plenty of features for most folks. I’m currently on the free plan, but plan on upgrading soon. Adding more servers and will need the extra space at Papertrail.

Do you use a log management service?

View Results

Loading ... Loading ...

In addition to collecting logs from your servers, you can also send logs from your applications. Got a PHP application that’s erroring out for some reason? You can send that error to Papertrail for later investigation.

Same deal with Apache logs, MySQL logs, and pretty much every other piece of software that generates logs.

Not many limits on what you can configure Papertrail to do for you. It’s very powerful.

I suggest you give it a try. Installation is super easy, especially if you’re using rsyslog. Below is a screenshot of their installation instructions. Doesn’t get much easier than that.
papertrail-install