Possible zerotier setup

I have asked a question a possible zerotier setup in the community support section - and I did not get not a single response.

Would it have made sense to post here instead?

ZeroTier can function just like any normal router but also has the same requirement on configuring routing between the subnets, default gateways, etc.

Is there something in particular that you’re thinking about?

With the mentioned setup:

network1:
  192.168.1.0/24
  - 192.168.1.2 local dns resolver, resolves *.home and forwards the rest (zerotier: 172.25.1.2)
  - 192.168.1.3 machine1.home (zerotier: 172.25.1.3)
  - 192.168.1.4 printer.home (no zerotier)

network2:
  192.168.2.0/24
  - 192.168.2.3 machine2.home (172.25.2.3)

zerotier:
  172.25.0.0/16

I have the LAN networks and the zerotier network next to it, just on a different interface.
Connectivity within that network is easy.

On machine1 I can just ping 172.25.2.3, which is machine2.

But I would still like to use the LAN addresses and just router over the zerotier network.
So that on machine1.home (192.168.1.3) this:

ping machine2.home (192.168.2.3)

becomes possible.

And what is still completely unclear is how the printer can be reached, from machine2.home (192.168.2.3):

ping printer.home (192.168.1.4)

given it has no interface on the zerotier network.

Is this routing something the can/needs to be configured on the zerotier side?
Or is this something I would have to do on the machines?

Plus the question of providing a dns server only for some networks/routes on the zerotier clients.
Using only the local DNS resolver for 192.* and 172.*.

So I guess the question is how to connect the two subnets 192.168.1.0/24 (net1) with 192.168.2.0/24 (net2) using ZeroTier. This might be conducted using regular routing:

  1. Add the following to “Managed Routes” in ZeroTier Central for the respective sub-net
    “192.168.1.0/23 via 172.25.1.3”
    “192.168.2.0/23 via 172.25.2.3”
    Please notice /23. For details regarding why see the link down below. Make sure packet forwarding is enabled on both nodes.

  2. If ZeroTier was installed on the default gateways you’re done, otherwise you must do either of points 3 or 4 down below:

  3. Add routing between the two subnets on the defaults gateway.

  On the default gateway for NET1: 
  - "add route 192.168.2.0/24 via 192.168.1.3" 
     or as an alternative use recurse routing:
  - "add route 192.168.2.0/24 via 172.25.2.3" 
  - "add route 172.25.0.0/16 via 192.168.1.3"

  On the default gateway for NET2: 
  - "add route 192.168.1.0/24 via 192.168.2.3" 
     or as an alternative use recurse routing:
  - "add route 192.168.1.0/24 via 172.25.1.3" 
  - "add route 172.25.0.0/16 via 192.168.2.3"

OR…

  1. Use masqurade/src-nat on ZeroTier for outbound traffic

This topic was automatically closed after 30 days. New replies are no longer allowed.