Port forwarding through multiple routing tables / rdomains

"Lars Noodén" lars.nooden at gmx.com
Sat Apr 6 22:39:09 AEDT 2019

I'm trying to find a way to forward ports from a client via a router with multiple rdomains to an internal server, across one of the rdomains:

             |        ~ rd01 + ----- Server01
             |       /       |
Client ----- + rd00 ~~~ rd02 + ----- Server02
             |       \       |
             |        ~ rd03 + ----- Server03

I am able to connect to the inner machine using nc(1) and route(8) to cross between the routing tables:

ssh -o ProxyCommand='ssh router.example.org route -T 2 exec nc %h %p' user2 at server02

However, that seems to eliminate the possibility of forwarding a port from the client to the inner machine.  Is there a way to forward ports despite crossing between two routing tables?  If so, how?


More information about the openssh-unix-dev mailing list