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
Put a host firewall on a new web server: deny by default, allow SSH from one admin address and HTTPS from anywhere.
Last updated
Linux command line · Intermediate · About 12 minutes
A new web server goes live tomorrow and has no host firewall. The security policy is short: incoming traffic is denied unless a rule allows it, SSH is allowed only from the administrators’ workstation at 10.0.0.8, and HTTPS is open to everyone. Plain HTTP stays closed.
Configure ufw to match, and remember the order: if you turn the firewall on before allowing SSH, a real server would cut off your own session.
A practice Ubuntu terminal that runs in your browser. It understands real commands, and nothing you type can break anything.
Check whether the firewall is on. (not done yet)
Set the default policy for incoming traffic to deny. (not done yet)
Allow SSH (TCP port 22) from the admin workstation, 10.0.0.8, and from nowhere else. (not done yet)
Allow HTTPS (TCP port 443) from anywhere, and leave HTTP (port 80) closed. (not done yet)
Turn the firewall on. (not done yet)
List the rules with their numbers to confirm them. (not done yet)
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+, Linux+, Network+, Server+
One way to complete the lab, with the reason for each step. Try it yourself first.
sudo ufw statussudo ufw default deny incomingsudo ufw allow from 10.0.0.8 to any port 22 proto tcpsudo ufw allow 443/tcpsudo ufw enablesudo ufw status numberedGuide
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.
No. It’s a practice terminal that runs in your browser. It understands the real commands the lab needs, and many more, and it answers the way an Ubuntu server would. It isn’t a full operating system: nothing is installed, and nothing you type can break anything.
The everyday ones: ls, cd, cat, grep, awk, sed, sort, uniq, find, chmod, chown, useradd, usermod, passwd, systemctl, journalctl, ip, ping, dig, ss and ufw, with pipes, redirects and sudo. Type help in the terminal for the full list. Text editors and package installs aren’t included.
It practices skills from CompTIA Security+ (Security Operations), CompTIA Linux+ (Security), CompTIA Network+ (Network Security) and CompTIA Server+ (Security and Disaster Recovery).
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.