I have a routing problem with trying to set up a test site-to-site configuration. I seem to be missing a piece somewhere but have come up blank trying to find it and in inquiries in various forums.
The scenario
Two networks with internet connectivity via routers providing NAT, lets call them site A (172.16.1.0) and site B (192.168.50.0), zerotier site-to-site setup as described in the details below.
From Site B, from a test node I can ping all the systems on Site A and all intermediate devices - Site B ZT gateway, Site A ZT gateway, test node residing on Site A network. I can also ssh into the test node on Site A from the test node on site B.
From Site A, from a test node I can ping the local ZT gateway, the Site A ZT client address, the Site B ZT client address, but not the Site B ZT gateway local network address or other nodes on Site B. From the Site A ZT gateway, I can ping everything and connect to test nodes on the Site B network.
Based on this behavior, I am thinking there is something wrong with the routing on the Site B gateway, but I have tried to keep everything as symmetric as possible. Im stumped - presumably it is something obvious.
Any thoughts?
Detailed Scenario
Two networks with internet connectivity via routers providing NAT, lets call them site A (172.16.1.0) and site B (192.168.50.0).
On each network, I have setup a gateway node with the zerotier client installed, on Site A this is a Pi4 (172.16.1.13), on Site B it is an Ubuntu VM (192.168.50.28).
I have a zero tier network created and both of the clients have joined this network.
Site A gateway client has zerotier address 172.30.0.130
Site B gateway client has zerotier address 172.30.0.14
I have managed routes defined in the zerotier network as follows
172.16.1.0/24 via 172.30.0.130
192.168.50.0/24 via 172.30.0.14
172.30.0.0/16 (LAN)
Site A router has the zerotier gateway node (172.16.1.13) defined as a gateway, and routes defined using the gateway (this is a pfsense box, so the gateways get defined separately from the routes)
Network 192.168.50.0/24 Gateway 172.16.1.13
Network 172.30.0.0/24 Gateway 172.16.1.13
Site B router has the following routes defined
172.16.1.0/24 gateway 192.168.50.28
172.30.0.0/24 gateway 192.168.50.28
Site A gateway has IP forwarding enabled, and the following rules.v4
*nat
:PREROUTING ACCEPT [0:0]
:INPUT ACCEPT [0:0]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A FORWARD -i eth0 -o -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i -o eth0 -j ACCEPT
COMMIT
Site B gateway has IP forwarding enabled, and the following rules.v4
*nat
:PREROUTING ACCEPT [81:73389]
:INPUT ACCEPT [72:15727]
:OUTPUT ACCEPT [29:4502]
:POSTROUTING ACCEPT [38:62164]
-A POSTROUTING -o eth0 -j MASQUERADE
COMMIT
*filter
:INPUT ACCEPT [13202:1688754]
:FORWARD ACCEPT [15997:35715961]
:OUTPUT ACCEPT [47852:38955960]
-A FORWARD -i eth0 -o -m state --state RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -i -o eth0 -j ACCEPT
COMMIT