I am currently using ssh to forward few ports like this:
There are 3 machines:
A-host- machine building the tunnel, one that can access both
B-host- machine that does not have access to A or C that that needs to be able to connect to
C-host- machine providing a service on port 636
A-host>ssh -R 636:C-host:636 -R 8080:C-host:8080 root@B-host
The question is how to make this tunnelling be persistent, to restore it even one or another machine is restarted.
I know that this probably require autossh but that't not the entire solution.