Hello, I had some similar issue, and I would like to share how I solved it, as it could help.
I have a gaming standalone vm with Steam installed. And I would like to play on my connected TV with SteamLink. When installed on an android TV, steamlink broacast a message on udp port 27036 to discover PC running Steam. As my Steam application is on the VM it can be discovered until I made a dnat to it.
On internet, you find some solution to enable dnat, so you can join your VM on this udp 27036 port from another PC on your local netwwork. It worked fine for me, when I tested from another PC, but the broadcas from the android TV still does not work. As it is a broadcasted message, it seems that whatever you make in nftable on this message (change destination adress, forward, dnat…), on the ethernet layer of the message, it is still a broadcast, and you are never allowed to propagate a broadcast from a subnetwork to another network. The only I add to make it work was to copy the message.
So I create a a chain in the prerouting:
sudo nft add chain qubes steamlink-mangle-broadcast '{ type filter hook prerouting priority mangle +2 ; policy accept; }'
First rule is to change the destination address if it is a broadcast from the local network having udp port 27036 as destination. Second tule is to duplicate the message.
sudo nft add rule qubes steamlink-mangle-broadcast iifname ens6 ip saddr 192.168.1.0/24 ip daddr 255.255.255.255 udp dport 27036 counter ip daddr set 10.137.0.41
sudo nft add rule qubes steamlink-mangle-broadcast iifname ens6 ip saddr 192.168.1.0/24 ip daddr 10.137.0.41 udp dport 27036 counter dup to 10.137.0.41
Then it works.
And when your VM is discovered, communication can be established with usual dnat
sudo nft add chain qubes steamlink-dnat-fedoraGame '{ type nat hook prerouting priority filter +1 ; policy accept; }'
sudo nft add rule qubes steamlink-dnat-fedoraGame iifname ens6 ip saddr 192.168.1.0/24 ip daddr 192.168.1.97 udp dport 27031 ct state new,established,related counter dnat 10.137.0.41:27031
sudo nft add rule qubes steamlink-dnat-fedoraGame iifname ens6 ip saddr 192.168.1.0/24 ip daddr 192.168.1.97 tcp dport {27036, 27031} ct state new,established,related counter dnat 10.137.0.41
sudo nft add rule qubes custom-forward iifname ens6 ip saddr 192.168.1.0/24 ip daddr 10.137.0.41 udp dport 27031 ct state established,related,new counter accept
sudo nft add rule qubes custom-forward iifname ens6 ip saddr 192.168.1.0/24 ip daddr 10.137.0.41 tcp dport {27036, 27031} ct state established,related,new counter accept
Hope it could help someone