Bind server to ZeroTier assigned IP on boot

I have some servers (microsocks,Dovecot etc.) binding only to the ZeroTier assigned IP on my bastion VPS. Seems simple and secure.

Now on reboot the IP of ZeroTier is not yet assigned, and the servers fails to start (via systemd).

Is there any way to make the IP available earlier in the boot process for binding ?
Maybe static configuration or some fancy bridging would help ?

Thanks.

Found a solution by creating a bridge which magically becomes the ZeroTier-interface.
Tested on Raspberry Pi.

# ZeroTier with IP-address early available to bind servers
# https://discuss.zerotier.com/t/bind-server-to-zerotier-assigned-ip-on-boot/25393

# 1) remove the assigned IP-address in my.zerotier.com for this host
# 2) create this file at: /etc/network/interfaces.d/br-zerotier
# 3) edit IP-address and bridge_ports accordingly
# 4) reboot or exec: sudo systemctl restart networking zerotier-one

auto br-zerotier
iface br-zerotier inet static
    address 10.10.10.3
    netmask 255.255.255.0
    # metric 99
    # mtu 2800
    # dns-nameservers 10.10.10.1
    # dns-search zerotier
    bridge_ports ztxxxxxxx
    # bridge_ports regex zt*  # use a regular expression to define ports
    bridge_stp off          # disable Spanning Tree Protocol
    bridge_waitport 0       # no delay before a port becomes available
    bridge_fd 0             # no forwarding delay
1 Like