The Wonders of Port Forwarding


For those Dal CS people off campus who would like to use Dal’s SMTP server, there is a way. Say if you are stealing wireless Internet from someone or you have other problems with using whatever SMTP server your ISP has provided (or in my case, I don’t have the username and password for the Eastlink account at my house and I can’t be bothered to ask anyone).

For Windows users using PuTTy, there is a way that is described on the Dal CS website, but that tutorial doesn’t hint that there is an easy way for Mac and Linux users to also do this. I suppose, most Linux/Mac power users might be able to discover things on their own, but I thought I’d share.

ssh -N -f username@torch.cs.dal.ca \\ -L10025:mail.cs.dal.ca:25 This command doesn’t actually give you a torch connection, but if you want to foward the ports and connect for an SSH session, remove the -N and -f flags. Also, the choice of port 10025 is arbitrary.

All you need to do after that is to set the SMTP server in your email program to localhost:10025. I’m thinking about writing a little Applescript that checks to make sure an SSH tunnel has been set up before trying to send mail.

Jan 19, 2005 12:37 If anyone is interested I found a good article on this subject at Security Focus.

Written by Colin Bate