I have just set up ssh tunneling for a client to a remote port on a remote server behind a firewall.
Set up ssh tunnel:
This can be done really simply on ubuntu by running the following command:
In this example I am forwarding port 3333 to port 1521 the vm 10.0.0.2 by sshing to the server 18.104.22.168 with the user user:
ssh -L 3333:10.0.0.2:1521 -N -f firstname.lastname@example.org
The server will then be able to connect to port 1521 on the remote server 10.0.0.2 by connecting to local port 3333.