So I, like many other people, have hit problems with nftables ordering, as has 
been discussed on this mailing list MANY TIMES.

This whole thing seemed ridiculous so I asked the nftables people about what 
one is *supposed* to do in this situation.  It turns out that the standard 
solution is for libvirt's nftables rules to set a packet mark (there's a 
collision possibility here but it's a 32 bit integer if you pick one at random 
it shouldn't be a problem) and then the user adds a rule to exclude packets 
with that mark from any reject rules they might have, or explicitly accept 
marked packets in their own chains, or whatever.

It's not *as nice* as the iptables situation, but having documentation that 
says "if you're using nftables make sure that packets with mark 79892 are 
accepted in all your chains" is quite straightforward compared to the current 
situation of "LOL good luck".  (I'm not blaming anyone there!, the current 
situation is impossible for libvirt to navigate and it's not anyone's fault.)

If y'all don't like that, what's working excellently for me is adding `iifname 
"virbr*" accept` to my rule chain.  FWIW.

It was very hard to navigate through this situation because there's no 
documentation that this problem even exists.

My suggestion is to describe the situation at https://libvirt.org/firewall.html 
and suggest the virbr* fix, and down the road maybe look at this mark thing.

I'd like to help.  I'm happy to write up issues for this, and I'm happy to 
write the updates to the firewall docs; just tell me what you'd like me to do.

Reply via email to