I had a qemu hook, that via iptables modified the rule in LIBVIRT_FWI chain adding “NEW” to “RELATED,ESTABLISHED” attributes. And that, together with port forwarding on the host, enabled me to forward host ports to VM.
Now Fedora 41 moved libvirt to use nftables. My questions are:
Do I still have to use hook to modify my rules?
Where and what rule should I create to enable external connection to my VM vi forwarded port?
nft replace rule libvirt_network guest_input handle 14 oif "virbr0" ip daddr 192.168.122.0/24 ct state new,established,related counter accept
The new attribut is cucial - enables incoming coneections. My VM is 192.168.122.5 and i Have the following firewalld rule on my host to forward 2105 port to 192.168.122.5:22: