DMZ Usage

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up dmz usage by placing public servers in a buffer network subnet. Firewalls sit on both sides to block direct paths to your private servers. Teams use this zone to host public web apps and mail servers safely. Still, broad firewall rules or shared server keys often weaken this setup. If an attacker breaks into one host, broad rules let them reach backend databases. How to plan your dmz usage architecture A demilitarized zone acts as a neutral space between the internet and your inter

Usage: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

You set up dmz usage by placing public servers in a buffer network subnet. Firewalls sit on both sides to block direct paths to your private servers. Teams use this zone to host public web apps and mail servers safely. Still, broad firewall rules or shared server keys often weaken this setup. If an attacker breaks into one host, broad rules let them reach backend databases.

How to plan your dmz usage architecture

A demilitarized zone acts as a neutral space between the internet and your internal network. You can build this zone with a single firewall that has three network ports. One port faces the public internet, one serves the buffer zone, and one guards internal systems. Many teams prefer a dual firewall setup for stronger separation between zones. The outer firewall allows public traffic to reach only the buffer subnet. The inner firewall checks every packet that tries to cross into the private zone.

When you plan dmz usage, you put only public services inside this middle subnet. Web servers, domain name servers, and mail relays belong in this outer zone. Your core databases and internal code stay behind the inner firewall. You then write strict port rules so web servers can talk to internal databases. Network engineers also turn off unused ports and block outbound traffic from the buffer zone. This layout keeps public users from talking straight to your sensitive private storage.

What network zones solve and what they miss

This subnet layout stops random internet scans from hitting your core servers. If an attacker compromises a public web host, the inner firewall slows their next move. They cannot scan your whole private network from the outside. It also helps teams group public assets in one place for easier network monitoring. Network logs show every IP address and port that crosses the firewall boundary.

Still, firewalls only check network packets, IP addresses, and port numbers at the entry point. Once a rule opens a port to an internal database, the firewall steps back. It cannot read the SQL queries or shell commands that run inside an open session. Engineers who log in through the zone often use shared admin roles to fix bugs. A valid session can still drop a table or pull a million user emails. Network perimeters decide which host can talk, not what specific commands run in flight. Also, network logs do not mask sensitive fields like card numbers or phone numbers.

Usage: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to tighten rules for internal database sessions

To lower risk, teams must look past simple IP and port rules. Start by cutting down the number of open ports between the buffer zone and private hosts. Give each app its own narrow database role with read or write limits. Remove shared admin keys from servers that sit in the public zone. Rotate your secret keys often so old credentials do not stay valid for months.

You should also track who runs commands on internal targets, not just which server IP sent them. When engineers need to check a live system, avoid opening wide network paths for their laptops. Pair your network zones with controls that inspect individual commands and mask sensitive fields in results. Rewriting emails, national IDs, and card numbers in query outputs keeps raw data safe during routine checks.

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 sits inline in the wire protocol beside those services as an open-source proxy, a sidecar for your Postgres or API. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review.

Your login details and client tools stay as they are while hoop.dev guardrails refuse bad deletes or drops before they run, and hoop.dev data masking rewrites matched sensitive values in responses 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

What servers belong in a DMZ subnet?

Place any host that talks directly to public internet users in this buffer zone. Common examples include web servers, load balancers, email relays, and public DNS hosts. Never place raw databases or internal file shares in this subnet.

Why is a dual firewall setup better for dmz usage?

Two firewalls from different vendors prevent a single software bug from exposing your private zone. An attacker must break through two distinct rule sets to reach internal data. It also separates public traffic rules from private internal rules.

Do cloud networks still need a DMZ?

Yes, cloud networks use public and private subnets to achieve the same goal. You place public load balancers in a public subnet with an internet route. You keep app servers and databases in private subnets with strict security group rules.

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.