Untitled

Forum: LXer Meta ForumTotal Replies: 3
Author Content
techiem2

Sep 28, 2011
5:41 PM EDT
Ok, that's probably not a clear description, but it's as close as I can figure out. Here's basically what I want to figure out if it's possible to do:

Say I have my laptop on a network I don't control (so can't setup port forwards or whatever), and need to give someone access to a local service on it (web server in Linux, game server in Windows, whatever). I can ssh out to something I do control (VPS server, etc.), so I can create a standard ssh tunnel.

Is there a way I can setup something on the VPS to forward the needed port through the tunnel to the laptop? i.e. someone connects to the VPS on port 8080 and it forwards that through the ssh tunnel I made from my laptop to the VPS to port 80 on the laptop.

Is that possible?

I know I could setup a VPN, but that assumes that the VPN connection can connect, which isn't as likely to be open outgoing from any random network as ssh is (it's pretty rare to find a network that has outgoing ssh blocked).

Thanks!

Edit: Gah, somewhere between previewing and posting the post title went poof....

Mark II
techiem2

Sep 29, 2011
3:08 AM EDT
Ok. Apparently I just need a plain old reverse ssh tunnel. Now I just have to figure out how to get Shorewall on my VPS to send connections through it. :P
techiem2

Sep 29, 2011
6:25 AM EDT
Figured it out with friend's help. It was binding to the local adapter on the vps instead of to all, thus keeping it from talking to anyone other than the vps itself. You need to do ssh me@myhost -R *:8080:localhost:80 and have GatewayPorts enabled in the sshd config.
ComputerBob

Sep 29, 2011
11:11 AM EDT
Glad we could help.

Posting in this forum is limited to members of the group: [Editors, MEMBERS, SITEADMINS.]

Becoming a member of LXer is easy and free. Join Us!