Shelly DW2 not working with Ubuntus' ufw

I have problems receiving state changes of my Shelly Door Window 2 if ufw on Ubuntu Server 20.04 is enabled. Port 8123 is configured, sure. Home Assistent is running in Docker. DNSmasq is running on port 53 in Docker also. I’m using the native Shelly integration of HA.
With firewall disabled there is no problem and I think Shelly devices don’t need port configuration for udp communication. Any suggestions?

Fixed it myself. Problem was using multicast in shellies configuration. Idk why.
Changed it to unicast with <HOST_IP>:5683 and opened incoming port 5683/udp in the firewall. Works fine now.
Maybe its helpful for someone…