Reverse port tunneling is used to give a user outside of a networks firewall accesst to a computer inside the firewall where direct SSH connections aren't allowed. It works by the in-firewall computer SSH'ing to a middleman computer that then forwards incomming SSH connections on a given port to the firewalled computer.
- Get an ubuntu EC2 instance
- Download it's security keys (both in-firewall and out-firewall computers will need the private key)
- Setup the security group to allow connections on port 10002
- SSH into the middleman and add:
GatewayPorts yes
to/etc/ssh/sshd_config