Author Topic: Automatic Port Forwarding  (Read 1731 times)

marshmn

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
    • http://www.mattmarsh.net/
Automatic Port Forwarding
« on: March 10, 2005, 09:43:49 am »
Here is my scenario for checking email:

If I'm at home I use the WiFi connection in the Z to connect to my home IMAP server. Fine, all is good and happy.

Now I go to work. In order to connect my Z at work through to my Z at home I need to first establish an ssh tunnel through to my machine at home, and reconfigure the email app to connect to the local port which goes through the ssh tunnel.

Having to switch between these two configurations is a bit of a pain. I was thinking that it would perhaps make more sense to have a little daemon running on the Z which listens on a port, and the email client connects to that local port. Once it gets a connection, the daemon could then determine which network profile is active and either forward out from that port directly to the IMAP server when I'm at home, and otherwise then create an ssh tunnel, and forward everything via that.

Does such a thing already exist somewhere?

It's not really a big project so I will put something together myself if it doesn't already exist.

Matt
SL-C860 - Cacko 1.22a

http://www.mattmarsh.net/

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3706
    • View Profile
Automatic Port Forwarding
« Reply #1 on: March 29, 2005, 10:15:30 am »
Quote
Here is my scenario for checking email:

If I'm at home I use the WiFi connection in the Z to connect to my home IMAP server. Fine, all is good and happy.

Now I go to work. In order to connect my Z at work through to my Z at home I need to first establish an ssh tunnel through to my machine at home, and reconfigure the email app to connect to the local port which goes through the ssh tunnel.

there's a program called "jumpgate" which is a userland tcp port forwarding program... http://jumpgate.sourceforge.net/

what I would do if I were you is set the mail client to connect to localhost port imap or s-imap.

when at home, use jumpgate to forward localhost:143 to imapserver-home-ip:143.

when remote, use ssh port forwarding to forward localhost:143 to imapserver-remote-ip:143

this is the sort of thing I do on my firewall at home so I can do work email over an ssh tunnel, and at work to be able to read my home email imap.

sorry, I don't have an arm-built binary of jumpgate. You could simply use ssh again, this time from Z to imapserver-home-ip.

hope this helps
Paul
« Last Edit: March 29, 2005, 10:16:04 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.