Joe Maller.com

SSH tunneling

My parents ISP, Cox cable blocks port 25 so I haven’t been able to send any mail whenever I visit. For years, I’ve known about SSH tunneling, but never played around with it. Now, about 8 hours before I head back to New York, I finally sat down, read the man pages and set up my first tunnel. It worked perfectly and I can send mail again. Here was the command:

sudo ssh [user]@joemaller.com -L 25:email.joemaller.com:25

I hadn’t yet read down to the -R flag, so that left an open connection in a terminal window. Not a big deal especially since I don’t yet know how to close a connection I can’t see without killing the process (and I’m not even sure that works).

In Mail.app, I added an outgoing mail server to the main account with the address “localhost” and all the same login settings as the normal server (password authentication, port 25, etc).

While I’m comfortable with the command line, I immediately started wondering about applications that could do this simply for non-geek users. There are a lot of times I get calls from friends and co-workers asking why they can’t send mail from some remote location. Unfortunately, the two applications I found, AlmostVPN and Tynsoe projects looked like they’d terrify casual users — too many options with scary names.

I might throw this onto the bottom of my to do pile, it seems like a simple AppleScript Studio project that I might be able to bang together in a few days. The basic interface should only show the address of the remote host and login-name, extras could go in a drawer. Another nice option might be automatically switching and restoring the outgoing mail server in the current mail account.


Leave a Reply