How to Configure Configure DMZ

Published
Length
3 min read

Luis Felipe Dias

All posts

To configure dmz zones, teams build an isolated subnetwork between public traffic and private systems. You set up strict firewall rules so outside traffic reaches only public servers. A demilitarized zone acts as a buffer for your private network. It holds public web servers, mail servers, and API endpoints. If an attacker breaks into a public host, they stay trapped in the buffer. They cannot reach private databases or core services on the inside network. Teams use this layout to protect sensi

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

To configure dmz zones, teams build an isolated subnetwork between public traffic and private systems. You set up strict firewall rules so outside traffic reaches only public servers.

A demilitarized zone acts as a buffer for your private network. It holds public web servers, mail servers, and API endpoints. If an attacker breaks into a public host, they stay trapped in the buffer. They cannot reach private databases or core services on the inside network. Teams use this layout to protect sensitive data while serving web users.

How to configure dmz zones and safe defaults

Before you configure dmz rules, you must pick a network topology. A single firewall setup uses one device with at least three network ports. One port faces the internet, one feeds the buffer zone, and one guards the private network. A dual firewall setup places one firewall at the public edge and a second inside. The buffer zone sits between these two devices for stronger isolation.

Your config affects both external users and internal workloads. Outside users send traffic to public web apps in the buffer zone. Those public apps sometimes need data from private backend databases. Safe defaults start with a deny-all rule on every firewall interface. You then open only the exact ports and protocols each app needs.

Never allow direct inbound traffic from the internet to the private network. Block hosts in the buffer zone from starting broad scans into private subnets. If a public app needs database records, restrict that path to one destination IP and port. Keep management ports like SSH closed to the public internet at all times. Place database servers and secret stores deep inside the private zone.

Auditing and limits of static network rules

Once you set up your firewall rules, you must test and audit them. Run port scans from outside the network to verify that only expected ports answer. Check firewall logs to see dropped packets and blocked connection attempts. Send all network logs to a central log server in the private zone. Review firewall rule sets every month to remove old ports and unused hosts.

Static network zones still leave big gaps during active sessions. Firewalls only check IP addresses and ports when a connection starts. They do not know which engineer or service account is running a command. Once an engineer logs in to maintain a host, the firewall steps aside.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

A valid network path does not stop a bad query or accidental table drop. Engineers often need to reach hosts in both the buffer zone and private subnets. Managing static VPN rules and firewall exceptions for every engineer creates operational drag. Network rules also cannot mask sensitive fields like emails, phone numbers, or card numbers in query results.

Managing engineer sessions across isolated network zones

Human operators and automated scripts still need a safe way to manage isolated hosts. Opening direct SSH or database ports across firewall zones weakens your network design. Teams should separate human maintenance sessions from public app traffic.

Use outbound-only agents inside isolated zones so you do not open inbound firewall ports. Map every session to a real user identity from your identity provider. Check permissions at the command or query level instead of trusting an IP address. Rewrite matched sensitive fields like national IDs in results before they reach the user screen.

Add runtime guardrails and masking beside your databases and APIs

Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits inline in the protocol beside the service as an open-source proxy, a sidecar for your database or API. On every production query an agent or human runs, hoop.dev decides whether to pass, mask, block, or escalate it for review.

Before a query runs, hoop.dev guardrails check the statement against your rules, an AI Analyzer you configure can score intent or hold risky calls for human approval, and hoop.dev data masking rewrites sensitive fields in responses in memory. Explore the MIT-licensed project on GitHub.

Frequently asked questions

Should database servers ever sit inside the DMZ?

No, database servers belong in the private internal network. Public apps in the buffer zone should talk to databases through one restricted internal firewall port.

What is the difference between single and dual firewall setups?

A single firewall uses three network ports on one device to separate zones. A dual firewall uses two separate devices so one failure does not expose private hosts.

How do engineers update servers in an isolated zone safely?

Teams avoid opening public management ports on the perimeter firewall. Instead, they route maintenance sessions through identity-checked paths that log every command run.

The query runs. The emails stay hidden.