It’s pretty easy to forget to add a firewall rule that allows people to access a resource such as an internal staging server from outside your network. To make sure the server is available I needed my requests to come from outside the internal work network but I wanted to be able to do this right now, using the computer that’s inside the network.

Turns out that’s pretty easy using a tool that pretty much every developer should have installed - SSH.

There are just three steps to getting this setup and working.

  1. Run a server somewhere that you can access using SSH. EC2 is ideal for this sort of thing.

  2. Open an SSH connection to it, telling it to act as a proxy (the -D flag does this, the other flags are for compression and similar goodies):

    ssh -C2qTnN -D 8080

  3. Configure your browser to use a SOCKS proxy. It’s running on localhost on port 8080.

Once you’ve done that, hit up and you should see the public IP address of the server you’re connecting shown on the site.

written by
Disagree? Found a typo? Got a question?
If you'd like to have a conversation about this post, email I don't bite.
You can verify that I've written this post by following the verification instructions:
curl -LO
curl -LO
gpg --verify{.asc,}