IRC Blocked? Create an SSH tunnel with PuTTY
Can’t get to IRC because port 6667 is blocked on your local network? Here are some instructions for how to create a SSH tunnel using PuTTY, and then connect to freenode (or any other IRC server) with Pidgin using the tunnel as a SOCKS5 proxy. You can most likely s/Pidgin/your IRC client of choice/, but the screenshots below will show the Pidgin config dialogs. These instructions also assume that SSH, port 22, is not also blocked. Woe be to you if that is the case.
My original source for how to do this was this post, which describes the same trick but for FireFox.
Step 1: create a new PuTTY session configuration. In this case I using the login email@example.com and calling the session irc-7777. I usually name the session based on the local port number I’m going to forward.
Step 2: go to the Connection -> SSH -> Tunnels node of the session config. In the Source port field enter “7777” (or some other port number). In the radio button section below that select Dynamic and Auto. Click the Add button. You should see “D7777″ appear in the list of forwarded ports.
Step 3: go back to the man session config node and save the session again. Then open the PuTTY session by clicking the Open button. A normal looking PuTTY terminal window should open. This session is your tunnel so you should probably leave it be. i.e., don’t use it for doing stuff in the shell and as a tunnel (although I don’t really know what consequences that would lead to). If the fact that this tunnel takes up space in your TaskBar (it does me) check out PuTTY-Tray.
Step 4: Configure your Pidgin IRC account to use the tunnel as a SOCKS5 proxy. Go to Accounts -> Manage Accounts. Highlight your IRC protocol account and click Modify (or create one by clicking Add). Go to the Advanced tab of the config dialog. In the Proxy Options section select SOCKS5 as the proxy type, enter “localhost” as the Host and “7777” (or whatever port you used) as the Port.
Save and that’s it. You should be able to connect to IRC server through Pidgin.
On a nix machine (or using Cygwin, I suppose) this is, of course, much simpler. You can replace the PuTTY steps with a single ssh command: *ssh -D localhost:7777 firstname.lastname@example.org