How to use port forwarding when you are behind a firewall.
to access a service running locally on the remote server.
To setup a proxy
ssh -L 3128:localhost:80 <username>@YOURREMOTESERVER
REMOTE Port forwarding
Below example could be used to access RDP behind a firewall, but accessible from YOURREMOTESERVER
ssh -L 3389:YOURREMOTE_SERVER_WHERESERIVERUN_IP:3389 <username>@YOURREMOTESERVER -N
3389 – RDP port
N – will not start a terminal session.
Use localhost as the hostname/IP to establish connection from your desktop