February 2008 Archives

29-02-2008 18:26

Tunneling to SMTP server

So I tunnell a lot of different ports from work to home. For example I tunnel through my ssh connection all http traffic to my home proxy so as to avoid any anoying proxy rules enforced at work.

This works fine, but one connection doesn't, my SMTP serveron port 25.

I have port forward local port 9025 to my servers 25 with the line:

LocalForward 9025 localhost:25

This works for everything else running on my server, including my IMAP service. This gets a connection refused error. So I tried this:

LocalForward 9025 127.0.0.1:25

But this fails too. So I tried this:

LocalForward 9025 server:25

This works!! Server is the local name of my server I use on my home network. Its statically set in the DHCP service. I can't figure out why this work. Something to do with being in the network that can relay ? Well I tried putting on username and password for sending mail in my email client, like others do to access my server as I have SMTP Auth working. But that didn't help. I checked my main.cf file for mynetworks:

mynetworks =  10.1.1.0/24 127.0.0.0/8

So that can't be it. Nothing comes through on my postfix logs, so the connection dies before it hits postfix. Anybody with an idea, email me please.


Posted by DaveQB | Permanent Link