hi Peter Stieber! thanks for posting this on q&a, its a solid question....
yes, u got it right, it works kinda like the policy based approach. first comes nat rule collections, then network rule collections, and finally application rule collections. microsoft docs confirm this here Azure Firewall rule processing.
about the rules inside a single collection. u noticed there's no priority setting for individual rules, and that's by design. the firewall processes them top to bottom in the order they're listed. but wait, why does the api show the bottom rule first? good catch!
the api response flips the order for some reason, but dont let that confuse u. the actual processing still goes from top to bottom as u see them in the azure portal. so if u have rule 1 and rule 2 in that order, rule 1 runs first, no matter how the api displays it. if u wanna double check, just look at the portal, it shows the real order. If u ever switch to firewall policy later, u’ll get more control with explicit priorities. but for classic rules, top to bottom is the way.
sometimes reordering rules in the portal can help u debug faster. just drag and drop them to test different scenarios. this might help in other tools too, not just azure firewall.
worth looking into how other firewalls handle rule order. for example, aws network firewall and palo alto also process rules sequentially, but their apis might display things differently. the key takeaway? always trust the management interface over raw api output when checking order ))
hope this clears things up! let me know if u hit any snags.
rgds,
Alex
and "yes" if you would follow me at Q&A - personaly thx.
P.S. If my answer help to you, please Accept my answer
PPS That is my Answer and not a Comment