I have the following setup: One machine with sshd running (local) behind a router (router) and a second host (remote) tries to access local through the internet and the router via ssh.
Therefor: Port forwarding router:22 -> local:22 (and router as gateway for local) . Works perfectly fine.
If I try to create a ssh tunnel from remote to local as follows:
ssh -L 1234:R:12345 user@R
this will only work if I also redirect router:1234 -> local:1234.
My understanding was, that ssh will tunnel all the traffic trough its connection on port 22. But it seems, that this is not the case. Am I doing something wrong? Is there any possibility to tunnel all the traffic through a single connection?