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

Click here to return to the 'Chicken Problems with SSH' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Chicken Problems with SSH
Authored by: mccabem on Oct 15, '03 12:40:07AM
OSXvnc server installed on iMac.
In Terminal on the PB I write: ssh -L 5901:localhost:5900 my.routers.ip.address

The connection establishes w/o any problems.

Local port 5901 will be sending traffic to local port 5900.

You don't want this...effectively a traffic loop (within your PB) to nowhere.

Try: ssh -L 5901:(imac's ip address):5901 ([user@]imac's ip address)

You'll have to make sure 5901 will be open to your iMac if that router has a firewall, and make sure the 2 hosts are on the same network, or that the router can connect the 2 different networks. The [user@] is only necessary if your account name on the remote computer is different than the account name from which you are connecting.

Most likely, if you can ping the iMac from the PB, you should be set for the above to work.

At most, you may need to set the iMac as the NetGear's "DMZ" host. This will cause it to forward all inbound connections to the iMac's ports. (No need to mess with individual port forwarding rules this way, but you may alternately go this route if you wish to keep a minimum number of ports open on the iMac. (I use the DMZ feature, FWIW.))

You want to point the VNC client on the PB (CotVNC) to localhost:5901, not :1.

You're set with that.

I do the same every day to access my computer at home from work. (VNC rocks! Use PuTTY to make the tunnel on the PC side.)

Good luck!

[ Reply to This | # ]
Chicken Problems with SSH
Authored by: jonwiley on Oct 15, '03 10:50:00PM

Thanks for your help. I tried what you said, but it still didn't work. But I figured out what I was doing wrong, thanks to your follow-up.

I tried plain VNC - w/o the SSH tunnel. Same behavior as before. I looked at OSXvnc's log and it showed the IP address of my client, or rather, what it thought the IP was.

It was the router's IP address. The iMac is the DMZ for the router, so every time it sent a response out to the client the router sent it back to itself.

I changed the iMac IP I had been using to the one my router assigned it. Worked like a charm. I suspect that when I connect from outside my LAN I'll use the router's IP.

[ Reply to This | # ]