DMZ Firewall Diagram

Published
Length
3 min read

Luis Felipe Dias

All posts

A dmz firewall diagram shows how to separate public traffic from your private network. You build it by placing public servers in a buffer zone between firewalls. Most teams set up this buffer zone to hold web servers and load balancers. When teams make firewall rules too broad, attackers can move into the private network. Broad rules let an external user reach internal databases and run bad commands. How a dmz firewall diagram works in practice A standard dmz firewall diagram uses either one

Firewall Configuration: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

A dmz firewall diagram shows how to separate public traffic from your private network. You build it by placing public servers in a buffer zone between firewalls. Most teams set up this buffer zone to hold web servers and load balancers. When teams make firewall rules too broad, attackers can move into the private network. Broad rules let an external user reach internal databases and run bad commands.

How a dmz firewall diagram works in practice

A standard dmz firewall diagram uses either one firewall or two separate firewalls. In a single firewall setup, the device has three distinct network ports. One port faces the public internet and takes in raw user requests. The second port connects to the buffer zone where public web servers run. The third port leads to the private network where your databases live.

In a dual firewall setup, you place two firewalls in a straight line. The outer firewall sits between the public internet and the buffer zone. It filters traffic coming from external users and sends safe requests to web servers. The inner firewall sits between the buffer zone and the private internal network. It checks every request that goes from a public server to a database.

Network engineers write strict routing rules for each zone in the diagram. External users can talk to the buffer zone over standard web ports. They can never send network packets straight into the private zone. Only specific servers inside the buffer zone can talk to the internal database. The internal database never starts a new session with the public internet.

What network zones solve and what they leave open

This network layout stops outsiders from scanning your private servers from the internet. If someone breaks into a web server, they remain stuck in the buffer zone. The inner firewall blocks them from reaching every host on the private network. It limits which IP addresses and ports can open a network path.

Still, a firewall only checks the network address and port during login. It decides which server can talk to the database, not what happens next. Once the inner firewall opens a port, the app server logs in. That server often uses a shared role with broad read and write rights.

Firewall Configuration: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Network rules cannot read the actual queries or commands sent inside that session. If an attacker takes over the web app, they use that open port. They can run a command to drop tables or pull all customer records. The firewall sees valid traffic on an allowed port and lets it pass.

This creates a blind spot for teams that handle sensitive user data. A firewall cannot rewrite emails, phone numbers, card numbers, or national IDs in flight. It also cannot tell which human developer ran a command through a shared tool. Teams need controls that check each command and mask data inside the session.

Check database and API queries on the wire

Identity tools, roles, and network rules decide who opens a session. Setup alone cannot check what each query does or mask sensitive values in a response once a session starts. When workflows touch Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, or internal HTTP APIs, hoop.dev runs beside those services as an open-source proxy, a sidecar for your Postgres or API. It inspects requests coming in and results going back on the wire.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run. On responses, hoop.dev data masking rewrites matched sensitive values in memory. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and writes every query and decision to an audit trail that generates evidence for HIPAA, GDPR, and PCI DSS. See the source on GitHub.

Frequently asked questions

Should I use one firewall or two in my layout?

Two firewalls offer better safety because each device uses separate rule sets. A single firewall costs less and works well for smaller server setups. Pick the dual layout if your team stores card numbers or national IDs.

Which servers belong inside the buffer zone?

Place any server that must talk to the public internet in this zone. This includes web servers, load balancers, email relays, and public API hosts. Keep all primary databases and internal code tools inside the private network.

Why do attacks still happen through an allowed firewall port?

Firewalls only check IP addresses and port numbers at the network layer. They do not inspect the database queries or shell commands inside the traffic. Attackers use the open web port to send harmful commands to the database.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.