White Belt: Palo Alto Firewall Fundamentals: Zones, Interfaces and Your First Policy
A Palo Alto firewall does not think in terms of IP addresses and ports the way a classic ACL does. It thinks in zones and applications. Once that model clicks, the rest of PAN-OS falls into place. This lesson builds a two-zone firewall from nothing: interfaces, zones, routing, one security rule and one NAT rule.
The mental model
| Concept | What it is |
|---|---|
| Zone | A named group of interfaces with the same trust level: trust, untrust, dmz, guest. Every security rule is written zone-to-zone. |
| Virtual router | The routing table. Interfaces are attached to a virtual router; it holds static routes and runs OSPF/BGP if you need them. |
| App-ID | The firewall identifies the application in the session (web-browsing, ssl, dns, ms-rdp), not just the port. Rules allow applications; service application-default means "on the port that app normally uses". |
| Security policy | Top-down rule list evaluated zone, address, user, application, service. First match wins. |
| NAT policy | A separate rule list, evaluated before security policy, that rewrites addresses. Security policy is written using pre-NAT addresses and post-NAT zones. |
| Commit | Nothing you configure is live until you commit. The candidate config is validated first; a failed commit changes nothing. |
Two default rules you cannot see at first
At the bottom of every rulebase sit intrazone-default (allow traffic within a zone) and interzone-default (deny traffic between zones). So before you write a single rule, trust-to-trust works and trust-to-untrust is blocked. Enable logging on both defaults; by default they log nothing.
1 · Interfaces and zones
admin@PA-440# configure
admin@PA-440# set network interface ethernet ethernet1/1 layer3 ip 203.0.113.2/30
admin@PA-440# set network interface ethernet ethernet1/2 layer3 ip 10.10.0.1/24
admin@PA-440# set network virtual-router default interface [ ethernet1/1 ethernet1/2 ]
admin@PA-440# set network virtual-router default routing-table ip static-route Default destination 0.0.0.0/0 nexthop ip-address 203.0.113.1 interface ethernet1/1
admin@PA-440# set zone untrust network layer3 ethernet1/1
admin@PA-440# set zone trust network layer3 ethernet1/2
Explanation: ethernet1/1 faces the ISP, ethernet1/2 faces the LAN. Both attach to the default virtual router, which gets a default route. Then each interface is placed in a zone. An interface in no zone passes nothing.
2 · Source NAT for outbound traffic
admin@PA-440# set rulebase nat rules Outbound-PAT from trust to untrust source any destination any service any
admin@PA-440# set rulebase nat rules Outbound-PAT source-translation dynamic-ip-and-port interface-address interface ethernet1/1
Explanation: everything leaving trust toward untrust is translated to the outside interface address (dynamic IP and port, what other vendors call PAT or overload). Note the rule is written trust → untrust using the zones the packet would land in after routing.
3 · The first security rule
admin@PA-440# set rulebase security rules Allow-Web-Out from trust to untrust source 10.10.0.0/24 destination any
admin@PA-440# set rulebase security rules Allow-Web-Out application [ web-browsing ssl dns ] service application-default action allow
admin@PA-440# set rulebase security rules Allow-Web-Out log-end yes
admin@PA-440# commit
Explanation: LAN hosts may browse the web and resolve names, and nothing else. service application-default means web-browsing on 80, ssl on 443, dns on 53; the same apps on odd ports are denied. log-end yes writes a traffic log when each session closes. Then commit makes it all live.
Why not "application any"?
It works, but you have thrown away the one thing you bought the firewall for. Start with a short allow-list of applications and let the traffic log tell you what else people need. Rules with application any are the first thing an auditor will circle.
Verify
admin@PA-440> test security-policy-match from trust to untrust source 10.10.0.50 destination 1.1.1.1 protocol 6 destination-port 443 application ssl
"Allow-Web-Out" { from trust; source 10.10.0.0/24; to untrust; destination any; application/service ssl/tcp/any/443; action allow; }
admin@PA-440> show session all filter source 10.10.0.50
ID Application State Type Flag Src[Sport]/Zone/Proto Dst[Dport]/Zone
3101 ssl ACTIVE FLOW NS 10.10.0.50[51322]/trust/6 1.1.1.1[443]/untrust
admin@PA-440> show running nat-policy
admin@PA-440> show counter global filter severity drop
test security-policy-match tells you which rule a hypothetical packet would hit without sending anything. The NS flag on the session means source NAT is applied. When something is being dropped and no rule logs it, the global counters with severity drop usually name the reason.
Try it: write the rule and commit
A simulated PA-440 with trust, untrust and dmz zones and the LAN-net address object already defined. Build the outbound web rule, commit, then prove it with test security-policy-match. Nothing is live until you commit.
Want goals and a checklist? Take the guided kata: Palo Alto security policy + commit · or open the full Practice Lab.
Summary
- Interfaces go in zones; rules are written zone-to-zone, with applications rather than ports.
- Interzone traffic is denied until you allow it; intrazone traffic is allowed until you deny it. Log both defaults.
- NAT is a separate policy, evaluated first; security policy uses pre-NAT addresses and post-NAT zones.
- Nothing is live until
commit. Verify withtest security-policy-matchandshow session.