Lab 5
Chapter 10
🐧 Linux

Firewall Rule Configuration

Configure iptables/ufw rules to implement a basic security policy.

0 / 7 tasks completed

📋 Tasks

1 Check current firewall status
sudo ufw status verbose
2 Set default policy to deny incoming traffic
sudo ufw default deny incoming
3 Set default policy to allow outgoing traffic
sudo ufw default allow outgoing
4 Allow SSH connections (port 22)
sudo ufw allow 22/tcp
5 Allow HTTPS traffic (port 443)
sudo ufw allow 443/tcp
6 Enable the firewall
sudo ufw enable
7 Verify the firewall rules
sudo ufw status numbered

💻 Interactive Terminal

bash — cyber-lab
Welcome to Lab 5: Firewall Rule Configuration
Type commands below to complete each task. Type 'help' for available commands.
──────────────────────────────────────────────
student@cyber-lab:~$
💡 Complete task 1: Check current firewall status

🤔 Reflection

Why do we default deny incoming but allow outgoing? When might you restrict outgoing too?

← Lab 4 Lab 6 →