Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Great tip - here is an extension.' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Great tip - here is an extension.
Authored by: smorr on Feb 04, '03 10:19:33PM

For the longest time I was unable to access my work's pop account from home because of the firewall (the place I work encouraged us to use the webmail client - ick) but a slight modification of this tipped really helped out.

here is what I did -

As I am the webmaster and I have ssh access to the webserver so I ssh into the webserver from home and set up the loopback following tunnel.

ssh -C 127.0.0.1 -R 10110:email.server:110 -l myusername

This forwarded port 10110 of the webserver to port 110 smtp of the emailserver

then from my home computer I set up the following tunnel

ssh -C www.mywebserver.url -L 110:localhost:10110 -l myusername

This forwarded the smtp port of my computer to the webserver (which then gets forwarded via port 10110 to the email server at port 110)

Lastly I set up mail.app to access my work's email at localhost port 110 and I'm in like flynn.

Set a email off to the network admin just to cover my butt (but looks to be strong and secure)






[ Reply to This | # ]
Great tip - here is an extension.
Authored by: Brock Lee on Feb 05, '03 04:52:46PM
I think you've made this overly complicated with the loopback. Assume you have three hosts: home.host, web.work.host, mail.work.host .

From home.host, try the following command:

    ssh -C -l myworkuserid web.work.host -L 110:mail.work.host:110


and that should be sufficient. Please confirm or disconfirm. Thanks!

[ Reply to This | # ]
Great tip - here is an extension.
Authored by: Eponymous on Feb 06, '03 09:08:33PM
Yes, this indeed works fine in the terminal:
ssh -l USERNAME TUNNEL_HOST_IP -L LOCAL_PORT_NUMBER:REMOTE_SERVER:REMOTE_PORT_NUMBER
where username is your name on the tunnel machine, tunnel_host_ip is the ip address or name of the intermediate (tunneling) computer, local_port_number is the port number you'll use locally to connect to the remote_server at its remote_port_number. If you have the same username on your local and tunnel computers, then you don't need the "-l USERNAME" part; it'll just assume it. For example I connect to remote port 548 (appletalk) and put it at local port 1548. Then I use "Connect to server" to connect to afp://localhost:1548 and there's my remote machine, tunneled through my tunnel computer. (Actually I have the remote computer listed in my favorites, so that once I've established the tunnel, I can just get at it that way; without the tunnel, I get an error about the favorites alias.) So it goes: local computer at port 1548 tunnel computer remote computer at port 548 I'd love to do this with an applescript so I don't have to have the terminal running, but I always have trouble with getting shell scripts to work properly if they're at all complicated. (A good tutorial for this is needed.) Is there a way to give your password in the ssh command? I didn't find one in the man pages. Fugu also handles this pretty well, though it doesn't yet remember enough of the settings, nor is it apple-scriptable. You have to leave Fugu and Terminal running after you set up the tunnel, so I think I'll stick with the terminal, because I have it open usually anyway. I just put a line in aliases.mine to spare me typing out the whole damn thing each time. (PS You can also set your ssh server on the tunneling computer to use a different port (22 is the standard one), in case you have a firewall at work, as I do. Just add "-p TUNNEL_PORT_NUMBER" right after ssh in the command.)

[ Reply to This | # ]