I forgot my laptop at home this morning. I got to work, opened up my backpack, and said, “AAAAUUUGHhhhhh….”. My coworker looked over and said, “That kind of noise can only mean one thing. You forgot your computer.” Rather than drive half an hour back home and then another half hour back to the office, I decided I would work home. Practically speaking this actually meant working from the coffee shop for several hours before actually working from home.
This introduced a new problem. In the office we have a tunneled connection to one of our partner’s networks. You just spoof a few addresses in your hosts file and you can hop onto their servers. Neat, but it turns out that when I’m at home, I can’t get to those servers because our network admin has our VPN pretty well segregated from the rest of the network. But I did have access to a server inside the network which had access to everything else. Along comes the command:
ssh -D 8080 -N remote_hostname
This will set up a local SOCKS proxy on port 8080 connected through remote_hostname. Then you can configure your machine to use your local proxy and it will forward traffic through to the remote machine. Ingenious.
Anyway, so I’m running Windows in a virtual machine. It is NAT’d to my local machine. I have an SSH SOCKS proxy over a VPN connection to the network at work. Work has a VPN tunnel to the partner’s network. With a little hosts file mangling and binding the above proxy command to the NAT address of my local machine, I was able to browse websites on our partner’s network with surprising speed. I can’t really believe it worked. Talk about many layers of indirection.