You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

How-To:Port_Forwarding.md 3.0 KiB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. ## Why?
  2. One example of why port forwarding is great is security. Downloading
  3. email and browsing the Internet in such a way that the immediate (local)
  4. network does not know what you are doing. All it sees is encrypted SSH
  5. traffic, like that used when you type on RedBrick normally.
  6. The example being given is to use your Redbrick account to port forward
  7. data via Redbrick. You can then configure local applications to use the
  8. tunnel rather than the usual route over say insecure wireless or hotel
  9. wifi thereby hopefully securing your data in transit.
  10. ## Theory
  11. There are some [good online
  12. guides](https://help.ubuntu.com/community/SSH/OpenSSH/PortForwarding)
  13. and if you read this you should be able to deduce the basics of how SSH
  14. works with port forwarding.
  15. ## How To do it
  16. ### Windows
  17. There are two ways of getting SSH to work on Windows.
  18. **PuTTY**
  19. [PuTTY](/PuTTY "wikilink") has built-in support for port forwarding.
  20. * When you\'re connecting, after you\'ve filled in the host name box
  21. (**NOTE:** If you wish to forward traffic through the RedBrick the
  22. host name **must** be login.redbrick.dcu.ie), click on Tunnels in
  23. the left-hand bar (second last item from the bottom).
  24. * In the Port forwarding box, fill in the following values:
  25. * Source port: (the port you want forwarded to the proxy -
  26. eg 1337)
  27. * Destination: <blank>
  28. * Ensure Dynamic is selected as the type and **then click Add**
  29. [center\|frame\|How to configure PuTTY to be a SOCKS
  30. proxy](/Image:Proxy_putty.png "wikilink")
  31. * Click the Open button to connect, and enter your username/password.
  32. * Tell Firefox (or anything else) to use localhost 1337 as its HTTP
  33. proxy. You should now be browsing via RedBrick!
  34. [center\|frame\|How to configure Firefox to use PuTTYs
  35. proxy](/Image:Http_proxy.png "wikilink")
  36. **OpenSSH for Windows**
  37. You can download and install [OpenSSH for
  38. Windows](http://sshwindows.sf.net) and then use the same command as you
  39. would for unix, if you don\'t want to use PuTTY.
  40. ### Linux
  41. If you read the neworder guide above you should have a good idea of how
  42. to build the SSH command for the forwarding, like so:
  43. `ssh -D 1337 username@login.redbrick.dcu.ie`
  44. Where :
  45. * -D specifies you want to link a dynamic port
  46. * 1337 is the local port (on your machine) you want to communicate on.
  47. * login.redbrick.dcu.ie is the server you want to open the SSH
  48. connection to
  49. ## Port forwarding for IRC
  50. If you want to connect to RedBrick IRC with your own client you will
  51. need to use port forwarding to do this.
  52. The process is the same as the above, just using different addresses and
  53. port configurations.
  54. `localport: 6667`\
  55. `remote address: irc.redbrick.dcu.ie`\
  56. `remote port: 6667`
  57. So for this it is instead using a local forward. So unlike the dynamic
  58. forward, instead set the option to be local, and add the destination as
  59. being irc.redbrick.dcu.ie:6667
  60. On CLI this is:
  61. `ssh -L 6667:irc.redbrick.dcu.ie:6667 username@login.redbrick.dcu.ie`
  62. Now, just tell your IRC client that your IRC server is localhost :)
  63. [Category:HowTo](/Category:HowTo "wikilink")