One question I often see has to do with setting up proxies and browsing from a different IP address. While this tutorial isn’t about how to browse the web anonymously, it explains how to tunnel your traffic through a web proxy. This can be used for:
- circumventing some types of censorship,
- slightly more private surfing,
- bypassing stateful packet inspection and content-filtering firewalls,
- accessing your instaFaceTwitSnap from work,
- getting around IP-based geo-blocking, and
- otherwise rebelling against the man.
To outside observers, it will seem as if you’re browsing from that remote machine. Here’s my ASCII-art version of what this looks like:
(You) <====== [encrypted tunnel] ======> (your server) <====> [your web browsing traffic, going to the sites you visit].
The whole thing takes about 3 minutes to set up; here’s how:
REQUIRES: An existing server with a public IP address (a rented VPS, for example). If you don’t have one yet, I use ramnode — they manage to be both awesome and cheap. Their $7/month KVM plan is really nice, has killer performance compared to competitors, and is perfect for beginners (Click on ‘VPS’ in the top menu, then click the big “KVM” button, then choose the plan you want and click the datacenter closest to you to order. Your machine will be up a minute or two after you finish the signup process).
That’s an affiliate link, by the way. If that makes you uncomfortable, you don’t have to use ramnode — use whatever VPS company you want.
The point is, you need a server running, with a real IP address (not something behind NAT), and with SSH Set up and configured. If you’re not sure how to do this, check out this tutorial video on how to set up SSH securely.
Okay, now that you’ve got all those things:
- Connect to the server with SSH, and ask SSH to give you (in addition to a regular shell session) a local port on your machine (12345) that can tunnel traffic to the remote server.
ssh -D 12345 email@example.com
- Configure your browser to use this port as a SOCKS5 proxy. In Firefox, this means
- Go to Preferences –> Advanced –> Network
- In the “Connection” section, click on the “Settings…” button
- Choose the “manual proxy configuration” radio button
- In the “SOCKS host” field, enter “localhost” and port “12345”. Leave everything else as it is (empty/0)
- Make sure the “SOCKS v5” radio button is selected.
- Click “OK”.
- You are a baller.
Now, when you surf the web through Firefox, you’re actually surfing from your remote server.