Firewall rule order simulator
Reorder and disable rules on a first-match firewall until every test packet gets the verdict the policy asks for, and see which rule decided each one.
- Interactive lab
- Beginner
- 4 graded steps
- 0 of 4 solved
Your goal
Your goalFind which rules give three packets the wrong verdict, then reorder and switch off rules until all eight match the policy.
The perimeter firewall checks rules top to bottom and stops at the first match. Anything that matches no rule is dropped by the default deny.
The policy: anyone may reach the web server on 80 and 443, only the admin network may use SSH, only the web server may reach the database, and the abusive range is blocked everywhere. Three test packets get the wrong verdict today.
What’s on screen
- Rules, evaluated top to bottom
- the rule list. Each rule has up and down arrows and an On switch. The firewall stops at the first rule that matches.
- Restore original order
- the button in the rules bar. It puts everything back.
- Test packets
- the table below. Each row shows what the policy wants, what the firewall says, and which rule decided.
- Walkthrough
- the numbered path beside the workbench (below it on a phone). Each step says what to do and what you should see. Hints open one at a time.
Words to know
- HTTPS
- HTTP protected with TLS encryption
- SSH
- Secure Shell, the encrypted remote login used on Linux servers
- UDP
- User Datagram Protocol, connectionless network traffic such as DNS
- allowweb
tcp any → 10.0.1.10/32 port 80,443Public web traffic - allowssh-any
tcp any → any port 22Temporary SSH rule from a migration - denyblocklist
any 198.51.100.0/24 → anyKnown abusive range - allowssh-admin
tcp 10.0.9.0/24 → 10.0.1.10/32 port 22SSH from the admin network - allowapp-db
tcp 10.0.1.10/32 → 10.0.2.20/32 port 5432Web app to its database - allowdb-any
tcp any → 10.0.2.0/24 port 5432Database subnet, added during an outage - denydefault deny
any any → any
| Packet | Flow | Policy wants | Firewall says | Decided by |
|---|---|---|---|---|
| p1Visitor loads the site over HTTPS | tcp 203.0.113.5 → 10.0.1.10:443 | allow | allow | web |
| p2Visitor hits plain HTTP (redirected to HTTPS) | tcp 203.0.113.9 → 10.0.1.10:80 | allow | allow | web |
| p3Internet host tries SSH on the web server | tcp 203.0.113.5 → 10.0.1.10:22 | deny | allow ✕ | ssh-any |
| p4Admin workstation opens SSH | tcp 10.0.9.14 → 10.0.1.10:22 | allow | allow | ssh-any |
| p5Blocklisted host requests the site | tcp 198.51.100.77 → 10.0.1.10:443 | deny | allow ✕ | web |
| p6Web app queries the database | tcp 10.0.1.10 → 10.0.2.20:5432 | allow | allow | app-db |
| p7Internet host connects to the database | tcp 203.0.113.5 → 10.0.2.20:5432 | deny | allow ✕ | db-any |
| p8Internet host sends an SNMP query | udp 203.0.113.5 → 10.0.1.10:161 | deny | deny | default deny |
Read first
More in Network defense
The whole walkthrough
Every step in order: 290 words, about 2 min. It gives away every answer, so try the steps first.