DEV Community

Hugo | DevOps | Cybersecurity
Hugo | DevOps | Cybersecurity

Posted on • Originally published at valtersit.com

Firewall 101: The 'Drop Everything by Default' Manifesto

I once audited a "secure" government-contractor network where the lead admin proudly showed me their $25,000 Next-Gen Firewall. It had every subscription active: AI-powered threat detection, SSL inspection, sandboxing—the works. Then I looked at the bottom of the filter list.

Rule #157: chain=forward action=accept src-address=0.0.0.0/0 dst-address=0.0.0.0/0 comment="Temporary fix for printer issues".

That "temporary fix" had been there for eighteen months. Because the admin couldn't figure out which specific ports the legacy Xerox scanner needed, they just opened the entire network to the entire world. They had spent $25,000 on a gatekeeper, and then handed the keys to everyone on the street because they didn't want to spend twenty minutes reading a packet capture.

If you have a "Permit All" or "Allow Any" rule at the end of your firewall, you don't have a firewall; you have a very expensive, very warm paperweight. You aren't practicing security; you are practicing hope. And in the world of 2026, hope is a remarkably poor defense against a motivated threat actor.

It is time to nuke your rules, embrace the "Default Deny" manifesto, and build a configuration where every single bit of data has to justify its existence before it’s allowed to pass.

The Rant: The "Troubleshooting" Lie

We’ve all heard it: "I’ll just disable the firewall for a second to see if that’s the problem."

That "second" becomes an hour. That hour becomes a weekend. That weekend becomes a year. Most "Permit All" rules are the scars of a sysadmin who got tired of fighting with a vendor’s vague documentation. Instead of doing the work—using tcpdump or the MikroTik Packet Sniffer to see exactly what traffic is being blocked—they take the path of least resistance.

The problem is that once you open that door, you never close it. You forget. Or you're afraid that closing it will break something you don't understand.

A Senior Sysadmin operates under a different philosophy: If I don't understand why a packet is moving, it shouldn't be moving. Security is not a feature you add on top of a working network. Security is the network. If your application doesn't work under a strict "Default Deny" policy, the application is broken, not the firewall.

The Mechanics: The Default Deny Principle

The "Default Deny" principle (also known as "Whitelist-only") is the only sane way to manage a network. In this model, you start with a completely empty routing table and a firewall that drops every single packet.

You then add "Allow" rules for specific, documented needs:

  1. Allow DNS (UDP 53) to your trusted resolvers.
  2. Allow HTTPS (TCP 443) to your web servers.
  3. Allow SSH (TCP 22) only from your Management Jump Box.

Everything else—every random scan, every misconfigured IoT device phoning home, every lateral movement attempt from a compromised laptop—hits the "Implicit Drop" at the bottom of the list and vanishes.

Why "Blacklisting" Fails

Most consumer routers and amateur setups use "Default Allow." They allow everything and try to block "bad" things. This is a losing game. There are billions of "bad" IPs and thousands of "bad" ports. You cannot possibly maintain a list of everything you don't want. You must maintain a list of exactly what you do want.

The Mechanics: Stateful Packet Inspection (SPI)

To run a "Default Deny" firewall without losing your mind, you must use Stateful Packet Inspection.


⚠️ DECLASSIFIED / TRUNCATED VERSION
You are reading a truncated version of this technical guide.
To read the full, unedited deep-dive (including all configuration files, architecture diagrams, and high-res images), visit the original post on Valters IT Docs.

Top comments (0)