Your first rule will match all traffic initially when evaluated, because the first packet is not enough to identify the application. Every time the application shifts (as the firewall learns more about the traffic with subsequent packets) it will re-evaluate the rules. Think of it this way: 1. The firewall gets a packet on some port that *could* be docstoc-base. The rule has "any" for everything else, so it goes ahead and transmits the packet tentatively matching the first rule. Remember app-id has not been completed yet so nothing will be denied yet 2. One or several more packets arrive, and the firewall now sees that the traffic is something that can still shift to another app, like web-browsing. The firewall re-evaluates the policy again, and this time only rule 1 could possibly match (maybe you have other rules for other apps). 3. More packets arrive, and the firewall can now determine that the app is NOT docstoc-base, and with no other rules matching it finds the intrazone-deny rule. Because the traffic last matched the first rule, which was an allow rule, that's the rule that is shown. If the firewall was unable to match any rules on the first packet, you would see the "not-applicable" app and it would hit the intrazone-deny policy. To address your bullet points: You can always deny a specific app regardless of whether or not you define the zones/addresses in the rule. The firewall itself cannot determine the app until the zones/addresses are evaluated, but that happens with that first packet. It's just that the app won't be known on the first packet. Sort of. If your policy has a zone/address and an application, and the rule is set to deny, it won't actually hit that rule and deny the traffic before the app is determined. The exception to this is if you define the port. The app is irrelevant if you're denying the port as well, since it won't matter what the app turns out to be if you're going to deny it anyway. See my first point above. It passes the first rule but tentatively shows it as matching since the app hasn't been determined yet. You might want to take a look at the life of a packet document. It goes through a lot of the deeper details about this whole process: https://live.paloaltonetworks.com/t5/Learning-Articles/Packet-Flow-Sequence-in-PAN-OS/ta-p/56081 Best regards, Greg edit: formatting
... View more