Read the scenario first
Each lab starts with a situation, the way a ticket or an exam question does. Work out what is being asked before you type anything.
Free tool · No sign-up needed
Write the rule set for a firewall between the internet, a DMZ and a LAN, then test it against nine requirements.
Last updated
Firewall rules · Intermediate · About 12 minutes
A company hosts its own website. The web server sits in a DMZ, the database it uses sits on the internal LAN, and one firewall separates the internet, the DMZ and the LAN. Whoever set the firewall up left a single rule that allows everything.
Replace it with a rule set that follows least privilege: customers reach the website, one administrator can manage the web server, the web server can query its database, and nothing else gets through. The firewall reads its rules from the top, and the first rule that matches a packet decides what happens to it.
A simulated firewall that runs in your browser. Your rules are tested with the packets the scenario describes.
Perimeter firewall, between the internet, the DMZ and the LAN
What the firewall must do
Take it further in OpenpassAI
OpenpassAI’s Hands-on Labs put you in a Linux or Windows terminal for the certification you’re studying, in guided, hint-only and timed modes.
About this lab
Free performance-based questions: Security+, Network+, SecurityX
One way to complete the lab, with the reason for each step. Try it yourself first.
| # | Action | Source | Destination | Service |
|---|---|---|---|---|
| 1 | allow | Internet | Web server | TCP 443 |
| 2 | allow | Internet | Web server | TCP 80 |
| 3 | allow | Admin PC | Web server | TCP 22 |
| 4 | allow | Web server | Database server | TCP 3306 |
| – | Deny | Any | Any | Any (the implicit deny) |
Guide
Each lab starts with a situation, the way a ticket or an exam question does. Work out what is being asked before you type anything.
Typing a command, getting it wrong and fixing it is what makes it stick. Use the hints when you’re stuck, not before.
Every lab has a worked solution with the reason for each step. Read it even when you finished: there is often a shorter way.
Reset the lab a day later and do it without hints. If you can, you know it. If you can’t, you’ve found what to study.
14 free labs in your browser: Linux and Windows command line, firewall rules and SOHO router setup, checked as you go.
Open the toolFree performance-based questions for 19 CompTIA exams: firewall rules, network diagrams, command-line tasks and drag-and-drop.
Open the toolFree practice tests for 261 popular certification exams, with explanations and a score by exam domain.
Open the toolFAQs
Find quick answers or contact our support team.
Each requirement is a test packet. The lab sends it through your rules from the top: the first rule that matches decides what happens to it, and a packet that no rule matches is denied, as on a real firewall. You pass when every packet is handled the way the scenario asks.
No. Any rule set that handles every test packet correctly passes, and there are usually several. The walkthrough shows one that works and explains why.
It practices skills from CompTIA Security+ (Security Operations), CompTIA Network+ (Network Security) and CompTIA SecurityX (Security Engineering).
No. The labs run in your browser and nothing is saved. Sign up only if you want OpenpassAI’s full labs and progress tracking.
OpenpassAI
Hi 👋 I’m OpenpassAI. Ready to prepare for your exam the smarter way?
Ready to explore OpenpassAI? I can show you how the platform helps you prepare, practice, and pass.