Jump to content

How-To:Port Forwarding: Difference between revisions

no edit summary
(removed deathray references)
No edit summary
Line 24: Line 24:


[[PuTTY]] has built-in support for port forwarding.
[[PuTTY]] has built-in support for port forwarding.
* When you're connecting, after you've filled in the host name box ('''NOTE:''' If you wish to forward traffic through the DCU proxy the host name '''must''' be carbon.redbrick.dcu.ie), click on Tunnels in the left-hand bar (second last item from the bottom).
* When you're connecting, after you've filled in the host name box ('''NOTE:''' If you wish to forward traffic through the DCU proxy the host name '''must''' be login.redbrick.dcu.ie), click on Tunnels in the left-hand bar (second last item from the bottom).
* In the Port forwarding box, fill in the following values:
* In the Port forwarding box, fill in the following values:
** Source port: (the port you want forwarded to the proxy - eg 1337)
** Source port: (the port you want forwarded to the proxy - eg 1337)
Line 42: Line 42:


If you read the neworder guide above you should have a good idea of how to build the SSH command for the forwarding, like so:
If you read the neworder guide above you should have a good idea of how to build the SSH command for the forwarding, like so:
  ssh -L 1337:proxy.dcu.ie:3128 carbon.redbrick.dcu.ie
  ssh -L 1337:proxy.dcu.ie:3128 login.redbrick.dcu.ie


Where :
Where :
Line 49: Line 49:
* proxy.dcu.ie is the server you want to send your tunnelled traffic to.
* proxy.dcu.ie is the server you want to send your tunnelled traffic to.
* 3128 is the port on that server you want to send your tunnelled traffic to.
* 3128 is the port on that server you want to send your tunnelled traffic to.
* carbon.redbrick.dcu.ie is the server you want to open the SSH connection to
* login.redbrick.dcu.ie is the server you want to open the SSH connection to




Line 55: Line 55:


For example, to tunnel local port 1337 to the SOCKS proxy on proxy3.dcu.ie through deathray:
For example, to tunnel local port 1337 to the SOCKS proxy on proxy3.dcu.ie through deathray:
  ssh -L 1337:proxy3.dcu.ie:1080 carbon.redbrick.dcu.ie
  ssh -L 1337:proxy3.dcu.ie:1080 login.redbrick.dcu.ie


Here we see that we specify the proxy definitively, and use the port that we
Here we see that we specify the proxy definitively, and use the port that we
would eventually negotiate (for those of you is res try running Wireshark, you will
would eventually negotiate (for those of you is res try running Wireshark, you will
see what I mean). We also use a specific Redbrick server, Carbon for our port
see what I mean). We also use a specific Redbrick server, Login (minerva) for our port
forwarding (there are restrictions on tunnelling through our other machines). You can also add the ''-v'' option to specify 'verbose' mode and see the port being opened and closed for your tunnelled traffic.
forwarding (there are restrictions on tunnelling through our other machines). You can also add the ''-v'' option to specify 'verbose' mode and see the port being opened and closed for your tunnelled traffic.


138

edits