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. :)
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 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!

Flash TWRP .img File From Ubuntu Using Fastboot

twrp

I use TWRP (TeamWin Recovery Project) on my Nexus 4. Back in the day (read: 3 years ago) I used ClockworkMod Recovery, on my Moto Defy, but have since switched to TWRP. I believe there were some licensing issues that drove a lot of people away from CWM. In any case, you’ll want to install adb and fastboot before proceeding.

From an Ubuntu distribution (Xubuntu in my case):

After adb and fastboot have been installed, boot your Nexus 4 into fastboot mode. Just switch your Nexus 4 off, then turn it back on while holding the volume down button. Keep holding the down button until you see a menu (usually with an Android guy somewhere on the screen). Entering fastboot mode may be different for your device, check the TWRP site, they have instructions for a lot of different devices.

Now, make sure your PC sees your device in fastboot mode. In a terminal window, run fastboot devices. If nothing is printed to the terminal, something is wrong, you probably don’t have fastboot enabled. If you did see some output, you should be good to go.

Download the latest recovery .img file from the TWRP site. Current version as of this post is 2.7.0.0. To flash it using fastboot, do this in a terminal:

If everything goes well, you should see something similar to this:

sending ‘recovery’ (8130 KB)…
OKAY [ 0.510s]
writing ‘recovery’…
OKAY [ 0.476s]
finished. total time: 0.987s

If you see something other than OKAY messages, something is probably wrong, and I have no idea what. If you do see the OKAY messages, you can either reboot your phone to Android or go to recovery which will take you to TWRP. With TWRP you can make a nandroid backup, flash new roms, flash new gapps, and all kinds of other things.

Install All Google Web Fonts on Ubuntu, Easily

TypeCatcher

There’s a few different ways to install the Google Web fonts on your Ubuntu system. Web UPD8 provides a script that does it for you.

Another way is to use TypeCatcher, as suggested by Jack Wallen at TechRepublic. You can install TypeCatcher via a PPA, which means easy updates. No auto-updates with the script method, unfortunately.

To install TypeCatcher via PPA, open a terminal and run sudo add-apt-repository ppa:andrewsomething/typecatcher and then run sudo apt-get update && sudo apt-get install typecatcher. That’s it, TypeCatcher should show up in your applications menu. If you’re using Xubuntu, it’s under Accessories.

I’d never heard of TypeCatcher until I came across Jack’s post at TechRepublic. Installed it on Xubuntu 13.10 and fell in love with it. Just select a font, and click the install button, done. The featured image for this post is TypeCatcher with the Lato font selected. For more details on TypeCatcher, go read Jack’s post.

If you can’t use a PPA, or don’t want to, you’ve still got a good option for easily installing the fonts with the script from Web UPD8. If you’d like to see how the script works, you can download it here. It essentially just using Mercurial to install them.

For instructions on how to install the script from Web UPD8, head over to their post about it, everything you need will be there. See? I just linked it twice for ya.

How To: Make Ubuntu Recognize All Drives During Install

When Ubuntu 9.10 Karmic Koala came out, I did an upgrade on one of my machines instead of doing a fresh install. I decided it was time to do a fresh install after Ubuntu 10.04 Lucid Lynx came out.

I backed up all of my important files and some configuration files to a second drive, /dev/sdb. My previous Ubuntu install was installed on /dev/sda1 and I used the sdb drive for photos and videos.

When the installation got to the point of configuring partitions, I was a little bummed to see that my first drive, /dev/sda, wasn’t included in the list of drives and partitions. This machine needed a fresh install badly, so I posted on the Ubuntu Forums to see if anyone knew of a fix.

After a few days of no replies, gregmo posted and offered a solution. He suggested running the command below while running the live cd, prior to installing. This removes dmraid from the system running off the live cd.

After removing the dmraid package, I fired up the installer and was able to install to /dev/sda1 just fine. For some reason, removing the dmraid package allowed the partition manager to see /dev/sda.

How To: Cisco and Microsoft VPN Through Firestarter on Ubuntu

After doing a fresh install of Ubuntu 9.10 Karmic Koala on my router, I realized that I had lost the ability to connect to my employer’s VPN. I use Firestarter for managing my firewall on this particular router.
[ad]
As I usually do, I googled “firestarter vpn“. Much to my dismay, it appeared that the Firestarter website was no longer alive. Instead of the usual Firestarter page, a page filled with useless links about security and anti-virus loaded. Luckily I was able to access the cached version of the page from Google. Since then, it appears that the Firestarter website has come back to life.

I wanted to make a note of how to allow VPN connections in the event that the Firestarter website becomes inaccessible again, that’s basically the point of this post. The page on the Firestarter site that details VPN connections can be found here. This should apply to pretty much every Linux distribution, not just Ubuntu.

To allow VPN connections with the Microsoft VPN client, simply enter the following lines into /etc/firestarter/user-pre.

[ad]
And to allow VPN connections with the Cisco VPN client, enter the following lines into /etc/firestarter/user-pre.

Finally, if you’re running a Microsoft VPN server and want to allow incoming PPTP VPN connections, add the following lines to /etc/firestarter/user-pre.

That should pretty much cover it. If you are using OpenVPN, head over to the Firestarter VPN configuration page for details.