[plug] Novel way to port forward over ssh

Brad Campbell brad at wasp.net.au
Mon Jan 3 21:56:34 WST 2005


G'day all,

I usually keep an ssh session open to my ISP on my laptop with the appropriate port forwards, but on 
my server which only needs to send an E-mail to to notify me if there is something amiss (like raid 
drive failure or a SMART error) I thought keeping an ssh session open permanently was a bit of 
overkill, so this is what I came up with.
My local ISP up here has stupid rules set up where you can only send an E-mail from an Etisalat.ae 
address and it's based on name rather than network address. So I just send directly to my private 
E-mail address by injecting directly into my ISP mailserver.

Of course I have a passwordless ssh key setup to my ISP account. (All machines set up like this are 
behind a NAT firewall with no holes so I'm not really that concerned about the security or lack 
thereof, of this setup)

/etc/inetd.conf excerpt

#time           dgram   udp     wait    root    internal
pop3b           stream  tcp     nowait  brad    /usr/bin/ssh ssh myisp.com.au ./nc localhost 110
smtpb           stream  tcp     nowait  brad    /usr/bin/ssh ssh myisp.com.au ./nc localhost 25

/etc/services excerpt

# Local services
smtpb           2500/tcp
pop3b           1100/tcp

I thought it was pretty clever anyway. Obvious when you think about it.

Regards,
Brad



More information about the plug mailing list