Meterpreter also has a built-in feature which allows direct access to the systems/services inside the network which are otherwise unreachable. The main difference between this and SSH tunneling is that SSH tunneling uses RSA encryption, whereas Meterpreter port forwarding happens over TLS.
Let's look at an example of port forwarding using Meterpreter. The command used for port forwarding using Meterpreter is portfwd. To view the options of the command, you can type portfwd --help into Meterpreter:
In this example, we have access to a host, as shown in the following screenshot:
We can now access the Meterpreter shell by right-clicking on the host via Meterpreter | Interact | Meterpreter Shell, as shown in the following screenshot:
In our example, we have a system with IP 192.168.0.5 running on port 443, which we want to access from outside:
...