Firewall questions that separate operators from memorizers: stateful inspection, rule order, NAT, VPN ports, Palo Alto and FortiGate, with model answers.
Firewall interviews often cover three layers: fundamentals (stateful filtering, deny by default, rule order, NAT), the platform the team runs, such as Palo Alto or FortiGate, and a troubleshooting scenario you talk through out loud. The scenario is the hardest to fake, because it shows whether you have run a firewall or only read about one. Below are 14 questions grouped by layer, each with what it tests and a short answer, then a worked troubleshooting example and a one-week prep plan.
Fundamentals
1. What is the difference between a stateless and a stateful firewall?
Tests: whether you know what the state table is for. A stateless packet filter judges each packet alone, by addresses, ports and protocol. A stateful firewall records each connection in a state table and checks every new packet against it. NIST's firewall guide gives the example that matters: for a forged packet claiming to belong to an established connection, a stateful firewall first checks that the connection is actually in its table.
2. What does "deny by default" mean, and does your firewall actually do it?
NIST recommends that, generally, all inbound and outbound traffic the firewall policy has not expressly permitted be blocked, and calls deny by default more secure than permitting everything not explicitly forbidden. The follow-up catches people. On Palo Alto, the predefined rules at the bottom of the rulebase allow traffic within a zone and deny traffic between zones, so two hosts in one zone can talk unless you add a rule. On FortiGate, traffic matching no policy is denied. Know your platform's real default.
3. How are firewall rules evaluated, and how do you order them?
Palo Alto evaluates security rules top to bottom, and a packet takes the first match, so specific rules go above general ones. NIST adds performance: on sequential firewalls, the rules matching the most traffic belong near the top. A strong answer names the tension: moving a broad, busy rule up can shadow a narrower deny below it.
4. Is NAT a firewall feature?
A trick question. NIST calls NAT a routing technology, though a stateful firewall doing NAT keeps the translation in its state table. The real test is how NAT changes the way you write rules (question 9).
5. What makes a next-generation firewall different?
Identification by application, not by port. Palo Alto's App-ID classifies traffic regardless of port, protocol or SSH/SSL encryption, using signatures, decryption where policy allows, protocol decoders and heuristics. The practical point: a rule for "port 443" admits anything on 443; a rule for an application admits only that application.
6. How is a WAF different from a network firewall?
OWASP describes a WAF as applying rules to an HTTP conversation, typically against attacks such as cross-site scripting and SQL injection. A network firewall decides which flows may pass; a WAF inspects what is said inside an allowed web flow.
VPN
7. Which ports and protocols does an IPsec VPN need through a firewall?
IKE uses UDP 500. When a NAT sits between the peers, traffic moves to UDP 4500, which RFC 7296 reserves for UDP-encapsulated ESP and IKE. Without NAT, ESP travels as IP protocol 50. That last point is the trap: ESP is a protocol number, not a port, so an ACL that only opens UDP 500 and 4500 can break a tunnel that is not behind NAT.
8. A site-to-site tunnel shows "up" but no traffic passes. Where do you look?
Tests: method under pressure. Check, in order: a route sending the traffic into the tunnel, a policy allowing it in both directions, a NAT rule translating traffic that should stay untranslated, and whether both peers define the same protected networks. Name the logs you would read at each step.
Palo Alto
9. With destination NAT, which addresses and zones does the security rule use?
The classic. Per Palo Alto's NAT documentation, security rules match the original, pre-NAT IP addresses but the post-NAT zone. For an inbound web server, the rule's destination is the public address, with the zone the server actually sits in. Get either half wrong and the published server stays unreachable.
10. In Panorama, what goes in a device group and what goes in a template?
Device groups hold policy rules and the objects they reference. Templates configure the Network and Device tabs: interfaces, zones, server profiles, VPN settings. The follow-up is rule order: shared pre-rules, device-group pre-rules, local firewall rules, device-group post-rules, shared post-rules, then the default rules.
11. What do the HA1 and HA2 links carry?
HA1 is the control link: hellos, heartbeats, HA state and configuration sync. HA2 is the data link: it synchronizes sessions, forwarding tables, IPsec security associations and ARP tables. When a failover drops existing sessions, check HA2 first.
12. How does SSL Forward Proxy decryption work, and what can't it decrypt?
The firewall holds one session with the client and another with the server, giving the client a forward-trust copy of the server certificate so it can decrypt, apply policy and re-encrypt. The limits earn the marks: it cannot decrypt sessions using client authentication or pinned certificates.
FortiGate
13. What is a VDOM?
In multi-VDOM mode, one FortiGate runs several VDOMs that act as independent units, with separate firewall policies and, in NAT mode, separate routing and VPN configuration. A follow-up: the management VDOM (root by default) handles FortiGuard updates and the unit's own traffic, such as remote logging.
14. How do you prove which policy a packet matched?
Run diagnose debug flow with an address filter. The output shows the matched policy ("Allowed by Policy-3"), the route and any source NAT. Two details show experience: flow tracing misses traffic offloaded to NP6 or NP7 processors, so trace with ICMP or disable offloading; and VIP policies take priority over ordinary ones, so a deny for a VIP needs match-vip and must sit above the accept rule.
Worked example: "We published a web server and nobody can reach it"
On Palo Alto:
- Weak answer: "I'd check the firewall rules and the NAT." True, and it tells the interviewer nothing.
- Strong answer: "First I'd confirm the traffic reaches the firewall at all. If it arrives and is denied, I'd run a Security Policy Match test with the source zone, the public destination address and port 443. The rule should use the public, pre-NAT address and the server's internal zone, because that is what the firewall matches. If the policy is right, I'd check the NAT rule matches the original packet, then the server's route back. Return traffic that leaves by another path can break a stateful session."
Then show judgment: what you would change, how you would test it before the commit, and how you would roll back. On FortiGate, use diagnose debug flow in place of the policy match test.
A one-week prep plan
- Days 1–2: Answer questions 1–8 in your own words, aloud, without notes.
- Days 3–4: Read the job post's vendor documentation on rule order, NAT and HA. With lab access, build a destination NAT and break it on purpose.
- Day 5: Prepare two stories: a change you made safely and an outage you traced, naming the logs you read.
- Days 6–7: Rehearse the worked example aloud until the order is automatic.
For more platform depth, see our Palo Alto interview questions, and for routing and switching rounds, the networking interview questions for experienced engineers and hardware and networking questions.
During the interview, Verve AI's Interview Copilot listens and shows suggestions only you can see. Its domains include Cloud & Infrastructure Engineering, and answers draw on the resume, job details and STAR stories you add and keep enabled.
Sources
- Stateless vs stateful inspection, state table, NAT as a routing technology, deny by default, rule ordering for sequential firewalls (NIST SP 800-41 Rev. 1, 2009): https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-41r1.pdf
- Palo Alto default rules (allow intrazone, deny interzone), top-to-bottom first-match evaluation: https://docs.paloaltonetworks.com/pan-os/11-1/pan-os-admin/policy/security-policy
- App-ID identification methods: https://docs.paloaltonetworks.com/pan-os/11-1/pan-os-admin/app-id/app-id-overview
- Security rules use pre-NAT IP addresses and post-NAT zones: https://docs.paloaltonetworks.com/pan-os/11-1/pan-os-networking-admin/nat/nat-policy-rules/nat-policy-overview
- Panorama device groups and rule evaluation order: https://docs.paloaltonetworks.com/panorama/11-1/panorama-admin/panorama-overview/centralized-firewall-configuration-and-update-management/device-groups
- Panorama templates and template stacks: https://docs.paloaltonetworks.com/panorama/11-1/panorama-admin/panorama-overview/centralized-firewall-configuration-and-update-management/templates-and-template-stacks
- HA1 and HA2 links: https://docs.paloaltonetworks.com/pan-os/11-1/pan-os-admin/high-availability/ha-concepts/ha-links-and-backup-links
- SSL Forward Proxy and its limits: https://docs.paloaltonetworks.com/pan-os/11-1/pan-os-admin/decryption/decryption-concepts/ssl-forward-proxy
- Security Policy Match test inputs: https://docs.paloaltonetworks.com/pan-os/11-1/pan-os-web-interface-help/device/device-troubleshooting/security-policy-match
- FortiGate: unmatched traffic is denied; VIP policies take priority; match-vip deny above the accept policy: https://docs.fortinet.com/document/fortigate/7.4.0/administration-guide/656084/firewall-policy
- FortiGate VDOMs, admin and management VDOM: https://docs.fortinet.com/document/fortigate/7.4.0/administration-guide/597696/vdom-overview
- FortiGate debug flow output and the NP6/NP7 offload limitation: https://docs.fortinet.com/document/fortigate/7.4.0/administration-guide/54688/debugging-the-packet-flow
- IKE on UDP 500, UDP 4500 for NAT traversal (RFC 7296): https://www.rfc-editor.org/rfc/rfc7296
- ESP is IP protocol 50 (RFC 4303): https://www.rfc-editor.org/rfc/rfc4303
- Web application firewall definition (OWASP): https://community.owasp.org/Web_Application_Firewall
Ryan
CEO of Verve AI






