The basic syntax for reverse tunneling with ssh is:
ssh -R [bind_address:]port:host:hostport [user@]hostname
By default, the listening socket on the server will be bound to the
loopback interface only. This may be overridden by specifying a
bind_address. An empty bind_address, or the address *, indicates
that the remote socket should listen on all ...
If anyone is interested in the solution, you will need to add the following options to your ssh config. It is called ssh multiplexing and it saves the ssh connections for resuse:
So now when you disconnect from your screen session on host where ansible is running, it will ...
Given that the two routers allow all connections to pass from either side the simplest thing is to add new IP addresses to the two interfaces of DEV2. We do this so that DEV2 can easily distinguish between packets meant for it, and packets meant to go through:
ip addr add 192.168.2.3/24 dev INTERFACE2
ip addr add 10.12.0.218/24 dev INTERFACE3
That's net.ipv4.ip_forward=1, usually in /etc/sysctl.conf, and enabling it will allow the router to route from any network to any other unless there are restrictions in place.
The simplest way to achieve the restrictions you want would be using iptables FORWARD rules.
For example, if the network interface for subnet 1 is eno1 and for subnet 2 eno2 ...