I have put a comment “Workaround for DHCPv6” on one rule. Without that rule the DHCPv6 client cannot get an IP address. But shouldn’t it? UDP is tracked just like TCP, otherwise NAT traversal wouldn’t be possible, right? Then why does the “established,related” rule not allow the DHCPv6 response through?
I can even see the connection in the Connections table:
It doesn’t have a state though, maybe that is the issue? If yes, then how can I match it with a rule?
The main thing, I would say, is that DHCPv6 starts by sending a “Solicit” packet to a multicast address (ff02::1:2) and the connection tracking module can’t be quite sure that the “Advertise” or “Reply” packet that comes back (depending on availability of Rapid Commit) can be classified as “related”. But there are even more nuances to this, of course.
Since RouterOS uses the Linux kernel underneath (and, thus, netfilter/iptables), we are able to find longer discussions on this issue. Here are some insightful examples:
A DHCP client sends most messages using a reserved, link-scoped
multicast destination address so that the client need not be
configured with the address or addresses of DHCP servers.
When the server responds, it will of course not be able to use ff02::1:2 as source address for its packets, but a fe80::/10 address, which means the packets will not be tracked as part of the previous outgoing connection.
BTW, the rule for DHCPv6 client in the MikroTik defconf firewall is: