MISSION LAB

Firewall Configuration & Defense

< Shield House

MISSION OBJECTIVES

0/8 Complete

    FIREWALL INTEL

    MISSION BRIEFING

    The company's edge firewall was reset during a maintenance window. You have 0 rules protecting a production web server, database, and SSH management interface. Build the firewall from scratch before attackers discover the gap.

    iptables Reference

    iptables -L -n -v
    List all rules (numeric, verbose)
    iptables -A INPUT -p tcp --dport 22 -j ACCEPT
    Allow SSH
    iptables -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
    Allow established connections
    iptables -A INPUT -s 10.0.0.0/24 -j ACCEPT
    Allow subnet
    iptables -P INPUT DROP
    Default deny policy
    iptables -A INPUT -i lo -j ACCEPT
    Allow loopback
    iptables-save > /etc/iptables.rules
    Save rules to file
    iptables -A INPUT -p icmp --icmp-type echo-request -j ACCEPT
    Allow ping
    Why This Matters
    iptables is the kernel-level packet filter in Linux. Every packet that enters, leaves, or traverses the system passes through these chains. A misconfigured firewall can lock you out or leave you wide open. This is CompTIA Security+ domain 3.3 material.