Advertisement
sohotcall

SSH Tunneling, bonus: Putty Configuration

Jan 11th, 2021
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.60 KB | None | 0 0
  1. SSH Tunneling
  2. =============
  3.  
  4. Local Port Forwarding
  5. ---------------------
  6. $ ssh -L 8888:192.168.1.111:1234 bob@ssh.myserver.com
  7. -- ---- ------------------ ----------------
  8. Tujuannya: Dengan mengakses port 8888 di komputer sekarang,
  9. trafik akan diteruskan ke server ssh ssh.myserver.com memakai koneksi ssh,
  10. kemudian server ssh akan mengirimnya ke komputer/port 192.168.1.111:1234.
  11.  
  12. Remote Port Forwarding
  13. ----------------------
  14. $ ssh -L 8888:192.168.1.111:1234 bob@ssh.myserver.com
  15. -- ---- ------------------ ----------------
  16. Tujuannya: Agar bila suatu komputer mengakses port 8888 di komputer server ssh ssh.myserver.com,
  17. trafik akan diteruskan ke komputer sekarang memakai koneksi ssh,
  18. kemudian komputer sekarang akan mengirimnya ke komputer/port 192.168.1.111:1234.
  19.  
  20. Dynamic Port Forwarding:
  21. ------------------------
  22. $ ssh -D 8888 bob@ssh.myserver.com
  23. -- ---- ----------------
  24. Tujuannya: Untuk menggunakan komputer server ssh ssh.myserver.com sebagai SOCKS Proxy
  25. yang diakses melalui port 8888 di komputer sekarang.
  26. Misal di Firefox bisa disetting di "Configure Proxies to Access the Internet",
  27. pilih "Manual proxy configuration", Socks Host: 127.0.0.1, Port: 8888, dan pilih "SOCKS v5"
  28.  
  29. Putty Configuration
  30. -------------------
  31. Pergi ke Connection -> SSH -> Tunnels
  32.  
  33. Add new forwarded port:
  34. Source Port: 8888
  35. Destination: 192.168.1.111:1234
  36. Pilih Local
  37. Pilih Auto
  38. Add
  39.  
  40. Add new forwarded port:
  41. Source Port: 8888
  42. Destination: 192.168.1.111:1234
  43. Pilih Remote
  44. Pilih Auto
  45. Add
  46.  
  47. Add new forwarded port:
  48. Source Port: 8888
  49. Destination:
  50. Pilih Dynamic
  51. Pilih Auto
  52. Add
  53.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement