[Novalug] ssh/tunneling weirdness
Mark Smith
mark at winksmith.com
Mon Sep 10 04:08:49 EDT 2007
i'm currently on the run all the time, but i still want my mail
server to forward mail to my little network enclave. my remote ip
address can be different, but my mx host has a static ip. i've
setup an ssh tunnel which, when activated, establishes a connection
from the remote site and starts up some additional port forwards.
it's essentially this:
ssh -R 1025:local:25 -L 1025:remote:25 -N remote
the remote MTA then forwards mail to me through 127.1:1025. This
works great when it works. unfortunately, it doesn't seem to want
to stay up for any length of time. one or the other of the port
forwardings seem to die pretty regularly. if i had to say, i would
say the remote forward seems to die more often.
e.g.
ssh remote nc -v 127.1 1025
localhost [127.0.0.1] 1025: connection refused
quite often, it just hangs instead of connection refused. the MTA
on the local side is supposed to respond with the normal banner.
i know the ssh connection is still up, but the port forward is
definitely down.
1. any comments as to why the port forwards seem to be shutting down?
2. any comments on how to keep it up longer?
i'm using a ServerAliveInterval of 10. i would think that that
would be often enough to keep any stateful firewall in check.
--
Mark Smith
mark at winksmith.com
mark at tux.org
More information about the Novalug
mailing list