DMZ Net

Published
Length
3 min read

Luis Felipe Dias

All posts

A dmz net is a buffer subnet that sits between the internet and your private network. You build it by placing public hosts in an isolated zone between two sets of firewall rules. Teams use this layout so outside users can reach public web apps without touching private servers. Still, broad firewall rules or shared host roles still let attackers or mistakes reach internal data. How a dmz net works in your network architecture A perimeter subnet splits traffic into three distinct zones: public

Net: the complete guide

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

Free white paper. No spam. Unsubscribe anytime.

A dmz net is a buffer subnet that sits between the internet and your private network. You build it by placing public hosts in an isolated zone between two sets of firewall rules. Teams use this layout so outside users can reach public web apps without touching private servers. Still, broad firewall rules or shared host roles still let attackers or mistakes reach internal data.

How a dmz net works in your network architecture

A perimeter subnet splits traffic into three distinct zones: public internet, perimeter zone, and private network. Your outer firewall checks packets coming from the internet and sends them only to perimeter hosts. Your inner firewall blocks direct traffic from the internet to your private database servers.

Only specific hosts in the perimeter zone can talk to private systems on approved ports. In cloud networks, teams build this same layout with public and private subnets inside virtual networks. Route tables and network control lists decide which IP addresses and ports can talk across subnets.

Security groups add host-level rules around each server in the public zone. Engineers also place load balancers and web servers inside the perimeter zone to handle customer requests. When an app needs customer records, the perimeter server opens a port to the private database. The database checks the host IP and the login key before starting the session.

What perimeter subnets solve and the gap they leave open

Setting up a perimeter subnet stops strangers on the internet from scanning your private servers. It limits which IP addresses and network ports can open a path to internal systems. If an attacker breaks into a public web server, the inner firewall blocks broad network scans. This boundary is a core part of network safety for both cloud and physical data centers.

Yet network firewalls and subnet rules only decide which host or user can open a session. Once a perimeter host or an engineer logs in, the firewall stops looking at the work. A perimeter rule cannot tell a safe read query from a command that drops a table. It also cannot tell when a query pulls ten thousand customer emails and card numbers.

Shared service roles make this problem worse during daily operations and live bug fixes. When five engineers log into a host with one admin role, network logs show only the IP. Auditors cannot see who ran which command or which database rows came back in the results. Teams also struggle when developers need quick access to fix a broken app in the private zone. Opening firewall ports for developer laptops weakens the boundary you worked hard to build.

Net: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

How to tighten rules across your perimeter and private zones

Start by trimming every port rule between your perimeter subnet and your private data zone. Allow only the exact ports your web apps need to reach internal databases or services. Remove broad subnet permissions and tie each rule to a specific server role or group.

Next, stop using one shared database user for every app and engineer in the subnet. Give each service its own login key and restrict its role to specific tables. For human access, require each engineer to log in with their own identity before running commands.

Finally, add controls that check individual queries and commands after the session starts. Mask sensitive fields like phone numbers, emails, and national IDs by rewriting matched fields in results. Require a quick peer review before anyone runs a risky update on a production database.

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 beside the service as an open-source proxy, a sidecar for your database or API.

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 review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.

Frequently asked questions

What is the main purpose of a dmz net?

It isolates public servers from your private internal network using strict firewall and subnet rules. If an outside attacker compromises a public host, they cannot reach your private databases right away.

Do cloud networks still need a perimeter subnet layout?

Yes, cloud teams still separate public load balancers and web hosts from private data subnets. Virtual route tables and security groups enforce the same zone boundaries as physical firewalls.

Why are firewall rules not enough to protect private databases?

Firewalls only check IP addresses and ports when a host or user opens a network session. They do not inspect the actual SQL queries, commands, or sensitive fields like card numbers inside traffic.

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.