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 22.214.171.124 with the user user:
ssh -L 3333:10.0.0.2:1521 -N -f email@example.com
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.