I have a set up that looks like this:
+
| +------------+
+---------+ +---+-----+ | +---------+ Remote Host|
|Client 1 +--+--------------->Server 1 | | | | 10.19.2.2 |
|10.19.1.2| +---------------|10.19.1.1| | | +------------+
+---------+ | +------------v-------+-+ | |
+---------+ | | | +-----------+ |
|Client 2 | | | ^ | +--------------------+
|10.19.1.3+--+ | | | | | Switch |
+---------+ | | v | | |
+---------+ | | | +-+---------+
|Client 3 +-----+ +--++-----+ | |
|10.19.1.4| |Server 2 | | |
+---------+ |10.19.2.1| <----+ |
+---------+ |
|
|
|
++
I'm using OpenVPN. Server one is set up to be at address 10.19.1.1 on a 24 bit subnet leasing IPs to Clients 1-3. Server 1 is also connected to server 2, and has a second IP address on Server 2's 24 bit subnet. Server 2 has the same client/server set up as Server 1. It has IP address 10.19.2.1 on a 24 bit subnet leasing an ip to the Remote Host.
Each server has two Interfaces as such:
+---+--------+
|Server 1 +-+tun0 10.19.1.0/24
| |
| +-+tun1 10.19.2.0/24
+------------+
+------------+
|Server 2 +-+tun0 10.19.2.0/24
| |
| +-+tun1 10.19.1.0/24
+------------+
Where tun0 is its server interface and tun1 is its client interface. How can I get these two networks to communicate using routing tables to server 1 and server 2? I've been able to get this to work out on Server 1, so that Client 1 could ping remote host, but not the other way around.
I did this by pushing a route to the clients from server 1 so that 10.19.0.0/16 is routed through server 1, then I set up masquerading on tun1 for server 1. I tried to do the same set up with server 2 and it doesn't allow the remote host to ping the individual clients.