Sometimes, the access to the lab/office computer is necessary. However, the university/company/organisation blocks my direct connection by its firewall, which is not good 🙁
Nevertheless, we can SSH to some computers in DMZ and then tunnelling to the lab/office computer for some specific applications.
Here, we leverage the forward function of SSH as following:
ssh -L port:host:hostport user@hostname
For example, we connect to a RDP server via SSH tunnel.
First, start the tunnel by
ssh -L 3389:188.8.131.52:3389 firstname.lastname@example.org
Above code starts a tunnel to 184.108.40.206:3389 where 220.127.116.11 is the RDP server ip address and 3389 is the RDP port.
Secondly, connect to 127.0.0.1:3389 via any RDP client.