PaulDotCom mailing list archives

Reverse VPN or SSH to Windows


From: bradmcmahon at gmail.com (Bradley McMahon)
Date: Mon, 16 Nov 2009 15:56:40 -0500

to setup a reverse ssh connection
ssh -R Port#1:localhost:Port#2 "host address"

-R is the option to setup the reverse proxy
Port 1: this is the port that you need to ssh to from the host in order to
connect back to the machine you initiated the reverse ssh connection
Port 2: is the port your connecting to the host to open the tunnel (default
22 for ssh)
host address is the host your connecting to.

so on the machine you want to connect to you from behind a firewall.
ssh -R 1020:localhost:22 adrian at remote.machine.com

and on your box your connected to to get back into that machine
ssh -p 1020 root at localhost

extra credit:
ssh -C -D 1080 -p 1020 root at loclahost

this will setup a socks proxy so you can actually use any program that
supports socks proxy as if you were on that actual machine, nice for making
changes to routers remotely.

happy hunting.

-Brad



On Mon, Nov 16, 2009 at 3:32 PM, Adrian Crenshaw <irongeek at irongeek.com>wrote:

Hi All,
    I'm playing around with making reverse connections out of a NATed of
network. I can do it with ncat no problems. I've tried to get reverse SSH to
work from a Linux box (using OpenSSH) behind NAT to a Windows box (using
putty), but so far no luck. I think it has something to do with no
gatewayports being present.  Anyone ever set thi up before?

I'd also be interested in a way to do a reverse VPN. Basically, I'd have a
drop box behind the firewall that would make a VPN connection out to me,
then I could use any tools I like from my client box. Any ideas on that?

Thanks,
Adrian

_______________________________________________
Pauldotcom mailing list
Pauldotcom at mail.pauldotcom.com
http://mail.pauldotcom.com/cgi-bin/mailman/listinfo/pauldotcom
Main Web Site: http://pauldotcom.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pauldotcom.com/pipermail/pauldotcom/attachments/20091116/09b2c431/attachment.htm 


Current thread: