Ever forget to add a firewall rule so people can reach an internal staging server from outside the network? I needed to verify that a server was accessible from the outside world, but I wanted to do it right now, from the machine sitting inside the network.
Turns out this is trivially easy with a tool pretty much every developer already has installed: SSH.
Three steps and you’re done:
-
Have a server somewhere that you can SSH into. EC2 is perfect for this sort of thing.
-
Open an SSH connection to it with the
-Dflag, which tells SSH to act as a SOCKS proxy. The other flags enable compression and keep things quiet:ssh -C2qTnN -D 8080 your-server-name-here.com -
Configure your browser to use a SOCKS proxy on
localhost, port8080.
Once that’s in place, head over to whatismyip.com and you should see the public IP address of the remote server rather than your own. All your browser traffic is now tunnelled through that box.
Quick, easy, and no VPN software required.