I have a question about SSH/Port forwarding. I haven't found the solution anywhere and don't know if there is any.
I have a server behind my NAT box at home. I have port forwarding from my NAT box to my server for SSH on port 22. Hence, I connect to
my_nat_public_ip:22 when I'm on the go and it works like a charm.
Now I know that I can access any port of my server as well even without configuring my NAT box for it. Indeed, I can just do a dynamic port forwarding like this:
ssh -D 1080 user@my_nat_public_ip
Then connect to port any_port of my server by settings my browser or else to use localhost:1080 as SOCKS proxy, and point to
What I would like to do, would be a command like
ssh -D --local_alias=local_alias user@my_nat_public_ip
and if I access local_alias:any_port it forwards to my_server:any_port
Would that be possible? Is there any SSH option to do this? It is just plain simpler and makes it possible to have multiple dynamic port forwarding on different servers.