7h3kk1d Posted May 29, 2011 Share Posted May 29, 2011 I have ssh access to my desktop in my home lan by forwarding the port using the router. On this computer I have drupal running in a virtual machine with its own IP address, I was wondering if there was anyway I could use ssh port forwarding to route traffic to the VM from the remote machine through my desktop without forwarding port 80 on my router. Quote Link to comment Share on other sites More sharing options...
Sprouty Posted May 29, 2011 Share Posted May 29, 2011 You could use the following command ssh -fND localhost:9999 <userame>@<EXTERNALIP> Then in you internet browse set it to use a socks proxy on localhost port 9999 and you should be able to browse to your internal webserver, as if you were on your home LAN. A more in depth tutorial is here: http://mysshlog.com/tutorials.php?Page=7 It normally used to secure your internet connection but can be used to browse local web servers, (Poor mans VPN) Cheers, Sprouty. Quote Link to comment Share on other sites More sharing options...
Infiltrator Posted May 29, 2011 Share Posted May 29, 2011 (edited) If you want to ssh into another machine, that's quite simple. You could ssh into your first machine and then ssh into your second machine. For example: Internet-> SSH into 1st machine, then from a terminal console from the first machine SSH into 2sd machine. On the router all you need is to enable forwarding port for the 1st machine, on the 2sd machine you will need to allow incoming SSH traffic. So in practice it should work. Edited May 29, 2011 by Infiltrator Quote Link to comment Share on other sites More sharing options...
Netshroud Posted May 30, 2011 Share Posted May 30, 2011 ssh -L localport:remotehost:remoteport SSHuser@SSHhost That will let you access localport as though it was remotehost:remoteport from SSHhost. Alternatively, you can do ssh -D localport SSHuser@SSHhost to create a SOCKS proxy on localport that runs through SSHhost. Quote Link to comment Share on other sites More sharing options...
7h3kk1d Posted May 30, 2011 Author Share Posted May 30, 2011 thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.