Hackbydoing Academy cheat sheet ยท ufw ยท iptables ยท firewall ยท defense
| ufw status verbose | Rules + default policy โ read this first |
| ufw deny from <ip> | Block one address completely โ the incident-response classic |
| ufw allow 22/tcp | Allow SSH (do this BEFORE enabling, or lock yourself out) |
| ufw enable / disable | Turn the firewall on/off |
| ufw delete deny from <ip> | Remove a rule |
| Default posture | deny incoming, allow outgoing โ then open only what you serve |
| iptables -L -n | List rules without DNS lookups |
| iptables -A INPUT -s <ip> -j DROP | Drop one source address |
| Order matters | First matching rule wins โ a broad ALLOW above your DROP silently wins |
| Defender's note | A firewall is a policy, not a talisman: it only stops what its rules describe |
Free from the Hackbydoing Academy โ the game that teaches real cybersecurity, attack and defense, on simulated networks. Play free at hackbydoing.com ยท Print this page (Ctrl/Cmd+P) for a clean paper copy.