Confused with SSH Port Forwarding?

  • Local port forwarding
  • Remote port forwarding
  • Dynamic port forwarding
  • Depends on the service which you want to access on your system from another system or you want to give access of the service from your system to another system.
  • Where you want to use your SSH password

Local port forwarding

  • -N: It tells SSH to not start a shell and only forward ports.
  • -L: It is used for local port forwarding.
  • 192.168.0.195:80: It’s the attacker's IP address and port used for mapping it with the victim's IP address and port.
  • 127.0.0.1:8000: It’s the victim’s IP address where the HTTP service is running.
  • root@192.168.0.131: It’s the victim’s machine IP address and username for SSH.
  • -p 22: It’s the SSH port using for SSH connection.

Remote port forwarding

  • -N: It tells SSH to not start a shell and only forward ports.
  • -R: It is used for remote port forwarding.
  • 80: It’s the victim’s port that is forward to the attacker's machine. Do netstat -antp, the 80 port is visible in the attacker machine.
  • 127.0.0.1:8000: It’s the victim’s IP address where the HTTP service is running.
  • root@192.168.0.195: It’s the attacker's machine IP address and username for SSH.
  • -p 22: It’s the SSH port using for SSH connection.

Dynamic port forwarding

--

--

--

Check This: https://lazyhacker22.blogspot.com/

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

VyFinance forms partnership with ADA Handle

HTB Doctor [writeup]

The Log4j vulnerability in plain english

Better Internet Search and Partisia to collaborate on EU blockchain project.

BORA 2.0 Official Site open!

Move To Earn Project RUNIE Airdrop Giveaway 6,000,000 RUNIE TOKENS to 3010 Lucky Winners

My Journey Writing A Post Exploitation Tool for macOS

Avast Business For Mac’

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Lazy Hacker

Lazy Hacker

Check This: https://lazyhacker22.blogspot.com/

More from Medium

Reverse Engineering with GHIDRA.

Nibbles (Linux) Write-up — LinEnum & How to call a bash shell with sudo priv

Ghidra Setup

HackTheBox — Backdoor Walkthrough

HackTheBox backdoor writeup