SSH
SSH tunnel (port forwarding)
Setup: 2 machines A and B. B is reachable to A. But B is not visible over the internet. A is accessible over the internet.
Aim: Access B over the internet with the help of A. For example, forward SSH service of B to internet via A
Requirement: Machine B must be running SSH server, and A has SSH client. You should have an account on B
Steps: On machine A: ssh -f user@B -L 1022:B:22 -N
Explanation: Machine A opens port 1022 to the traffic coming from internet and forwards it to port 22 of machine B. You can replace A and B with real IP addresses and user with your user account on machine B