Wednesday, March 18, 2015

Tunneling

So sometimes it is necessary to tunnel to get access to a router (which is a way more secure way to get to that router).

Windows:
Windows doesn't have a native terminal. I use PuTTY (tty - teletypewriter new fun fact)
UPDATE: Windows 10 does have a Linux terminal now (its basically an Ubuntu shell if I remember correctly). I will add a post on how to enable it but honestly I have found I prefer KiTTY.
In the settings under Connections>SSH>Tunnels you can add a tunnel. Source port is the port you want to connect through and then the ip of the gateway and port. Click add and it adds it to the list above.

Then go to 127.0.0.1:8080

For those seeking an alternative to PuTTY I found KiTTY it is similar but gives the end user a few more options, as well as allows for saving sessions to a directory or registry. I am pretty sure it was built with the PuTTY backbone though.

Linux:
ssh -f user@ip.of.lan.machine -L 8080:ip.of.default.gateway:443 -N
-L is for local-port:hostname:remote-port format
-N is to not execute a command on the remote system.

Then go to 127.0.0.1:8080 -note if it is https you may have to put in https:// before the 127
A Ctrl + c should end the tunnel.

1 comment:

  1. Note: ssh user@ip.of.lan.machine -L 8080:ip.of.default.gateway:443 will log you into the machine if you wish for that.

    ReplyDelete