đ§ą Firewall Rules Explainer
A firewall is a bouncer for your network traffic. Learn the core ideas, simulate your own rules, and see the defensive rules every home setup should have.
â ī¸ Ethical Use Only: These tools are for defensive purposes â securing your own accounts and systems. Never use security knowledge against systems you do not own or lack written permission to test.
đ§ The 4 ideas behind every firewall
- Inbound vs outbound: inbound = someone trying to reach you; outbound = you (or your apps) reaching out. Most attacks arrive as inbound traffic.
- Allow vs deny: every rule either permits traffic or blocks it. Rules are checked top to bottom â the first match wins.
- Default-deny: the golden principle â block everything, then allow only what you need. Far safer than allowing everything and blocking the bad.
- Stateful: modern firewalls remember your outgoing connections, so replies to your own requests are allowed automatically.
đŽ Rule simulator â build a firewall rule
đĄī¸ Sensible default rules (home devices)
| Rule | Why |
|---|---|
| Deny all unsolicited inbound | Nothing on the internet should be able to initiate connections to your laptop. This single rule stops most network attacks. |
| Allow established/related traffic | Replies to connections you started (web pages loading) must get back in. |
| Allow outbound web + DNS | Browsing and name lookups need to go out. Everything else outbound can stay restricted on strict setups. |
| Deny inbound file sharing (445) & RDP (3389) from the internet | These are favorite attacker targets. Only allow them on trusted local networks â or better, through a VPN. |
đģ Turn on your firewall (your own device)
- Windows: Settings â Privacy & security â Windows Security â Firewall & network protection â make sure it's On for all profiles.
- macOS: System Settings â Network â Firewall â turn On.
- Linux (Ubuntu): open a terminal on your own machine and run
sudo ufw enable, thensudo ufw default deny incoming.
â ī¸ Never disable your firewall to "fix" a connection problem permanently â find the correct rule instead, and never change firewall settings on devices you don't own.