Let me reiterate one point first: If you can enable IPv6 on your WAN, ZT will preferably use IPv6. This avoids any hole punching on the Mikrotik for IPv4 ZT VL1 tunnels. Obviously not always possible, so to answer the questions…
The point was about if you have another router between the Mikrotik with ZT and the internet. Say an ISP router in-between you can’t remove, and it’s that route that may support uPnP or NAT-PMP – and on that non-Mikrotik router, you might want to make sure either one of those protocols is enabled to help ZeroTier enable a more direct path though the intermediate router. e.g. sometimes other routers have some UI/checkbox to enable UPnP and/or NAT-PMP support, which be good to enable to aid ZT path discovery.
If the Mikrotik has a direct route to the internet (even if behind a NAT), no additional steps are needed (beyond the firewall filter and/or NAT rules discussed in docs and above).
That should be unnecessary if the goal is allow Mikrotik ZT tunnel to make a tunnel to the ZT network.
What the above rules allow… and if the Mikrotik is the default gateway for a ZT network e.g. the ZT network at my.zerotier.com has a 0.0.0.0/0 route to the Mikrotik’s ZT IP address. Is if say you have some desktop/PC/laptop/smartphone that is a member of the same ZT network…and the client has “Allow Default Router Override” set so the Mikrotik is this desktop route to the internet… Then the above UPnP rule will allow that desktop, connect to same ZT network as Mikrotik, to punch holes in the Mikroitk firewall. UPnP is typically done by games and SIP clients, so that allow it happen from members of the ZeroTier network, who were using the Mikrotik as the default gateway to internet.
A different use for uPnP being enable on the Mikrotik is if the Mikrotik LAN if it has users that also have ZeroTier clients.
/ip upnp interfaces add interface=WAN type=external
/ip upnp interfaces add interface=LAN type=internal
Since these non-Mikrotik ZT client on the local LAN may use additional/different ZT networks than the Mikrotik, those may have different paths needed. If uPnP is enabled for the LAN interface list, then those desktop/smartphone ZeroTier client will attempt UPnP to form their own paths to various ZT networks. Since UPnP is deterministic on the assigned port it likely slightly quicker to establish tunnels since it doesn’t have to test using various port. Basically UPnP will short-circuit more complex hole punching techniques. As a bonus, if LAN ZT client’s tunnels will show up as dynamic entires in the firewall with comments – so the ZT tunnels from LAN become more “visible” to the admin. Otherwise, an admin finding VL1 tunnels in a network is non-determistic (see the complex script in #2 above to find peers in firewall on the Mikrotik, and it’s impossible to do for LAN client’s ZT tunnels).
No. But the ZeroTier client on Mikrotik may try it when establishes paths to next-hops beyond the current Mikrotik running ZT. Similar to above, it just an option ZeroTier’s ZL1 tunnels may try when establishing paths.
Hmm. I’m of the thought that if action=endpoint-independent-nat is needed for something, someone else made some poor design decision someplace. So not thought about its interaction with ZT. But ZT has its own complex logic to deal with NAT hole punching, so thinking it’s best not mess with their logic by remapping things. It really shouldn’t be needed since ZT will likely do something reasonable without ANY kind of port forwarding etc.
Now since Mikrotik didn’t support being a ZT controller when I wrote this article, I cannot say how rules involving “action=endpoint-independent-nat” would interact with ZT controller side… But since ideally ZT use one port (default 9993), just making sure that port was available on a controller should be all that’s need. So worse case, you might need some dst-nat upstream in more complex topology. But the how ZT controller work be another article…