Monday, October 9, 2017

Socks Proxy Setup

RIP WPA2

I can never remember how to set up a Socks proxy to my Digital Ocean Droplet, so here is a simple little how-to guide.

Using a secure proxy server to somewhere else in the wild wild world, to get through a local insecurity suddenly got added urgency, since the WiFi WPA2 protocol is now officially broken.

Using a secure proxy in this way, will prevent local script kiddies from looking over your shoulder on a WiFi connection.

Note that the cheapest Digital Ocean Linux or BSD virtual server costs only $5 per month and that is all you need.  You don't even need to change or install anything on it, since it comes with sshd running by default.  So, just sign up for one, start using socks over ssh and relax.

On the laptop:
Add nameserver 8.8.8.8 to the top of /etc/resolv.conf

Start the socks proxy:
# killall ssh
# ssh -fND 2222 -p 22 root@w.x.y.z

Firefox:
Open Menu
Preferences, Advanced, Network, Settings:
Socks host: localhost, port 2222
Socks 5
Use Remote DNS

Skype:
Open Skype.
Enter your Skype credentials and Sign in.
In the Menu Bar click Tools and then Options…
Advanced, Connection.
Automatic proxy detection: SOCKS 5.
Host: localhost
Port: 2222.
Uncheck Enable proxy authentication.
Save.
OK.
Restart Skype and Sign in again.


This script sort of works:
#! /bin/bash
sed -i -e 's/nameserver/nameserver 8.8.8.8\nnameserver/' /etc/resolv.conf
killall ssh
ssh -fND 2222 -p 22 root@w.x.y.z


Mac

On a Macintosh, as soon as you enable the Socks proxy server in the System Settings, *everything* will go through it - Email, Safari, Firefox, Skype...  This is both convenient and annoying, since from then on, you always have to run the proxy.


La voila!

Herman

No comments:

Post a Comment

On topic comments are welcome. Junk will be deleted.