DMZ Web Server

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up a dmz web server by placing it between two firewalls. An outer firewall takes web traffic while an inner firewall guards private hosts. Most network teams build a separate subnet for this public zone. They open web ports to the internet and block direct paths inside. Yet engineers still need a way to log in and fix broken apps. When teams grant broad network roles for upkeep, one stolen key risks everything. How a dmz web server works in your network A boundary subnet sits between

JSON Web Tokens (JWT) + Kubernetes API Server Access: 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 a dmz web server by placing it between two firewalls. An outer firewall takes web traffic while an inner firewall guards private hosts. Most network teams build a separate subnet for this public zone. They open web ports to the internet and block direct paths inside. Yet engineers still need a way to log in and fix broken apps. When teams grant broad network roles for upkeep, one stolen key risks everything.

How a dmz web server works in your network

A boundary subnet sits between the public internet and your private internal network. The outer firewall lets public users send web requests to the host. If the app needs data, the host must talk to an internal database. The inner firewall checks every packet moving from the perimeter zone inward. Network admins write strict firewall rules that only allow specific ports and hosts.

In a dual firewall setup, traffic never jumps straight from public to private. Public requests stop at the perimeter host first. That host then starts a brand new session through the inner firewall. Cloud networks work the same way by using public and private subnets. Routing tables and security groups act as the inner and outer walls. You put the public app in the outer subnet with strict route rules.

How teams manage admin access and service keys

Web traffic is only half of the perimeter setup puzzle. Developers and operators must also log in to update code and read logs. Teams often open an admin port from the internal office network. Next, they put service keys on the host so it reads internal databases. Those keys sit in plain text files or local memory on the machine.

To keep things moving fast, teams often share one root role for upkeep. The app also uses a single broad database role for all its queries. Everyone on the ops team uses the same path to check the host. This setup makes daily work fast, but it creates a large blast radius.

JSON Web Tokens (JWT) + Kubernetes API Server Access: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

What perimeter firewalls solve and what they miss

Perimeter firewalls are great at stopping random port scans from the outside internet. If an attacker breaks into the web app, the inner firewall blocks movement. They cannot scan your whole private network from the perimeter subnet. Network rules verify which machine can talk to another machine on a port.

Still, network rules only check the start of a connection. Once an admin logs in or the app connects, the firewall goes blind. It does not inspect which shell commands an engineer runs during a fix. It also cannot read the database queries running over that allowed internal port. If an attacker steals the local database key, the inner firewall allows them. The traffic comes from the right host on the right port, so it passes. Also, shared roles leave no clear audit log of who ran what. You also cannot mask sensitive fields like emails or card numbers in flight.

Govern statements and responses across databases and APIs

Good config and scoped roles are needed setup. They do not check single queries in flight or mask sensitive fields in returned rows. Across Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes APIs, SSH, and internal HTTP endpoints, hoop.dev sits inline in the protocol beside each supported service as an open-source proxy, a sidecar for your database or API. For every query or command an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human approval.

First, hoop.dev guardrails block banned queries before they run or hold risky ones for review, and hoop.dev data masking rewrites matched sensitive values in responses in memory. Furthermore, hoop.dev holds SOC 2 Type II and is open source on GitHub.

Frequently asked questions

Should I store database data on a dmz web server?

No, you should never keep primary database records in the perimeter subnet. Keep all databases inside the private network behind the inner firewall. Only allow the public host to query the private database over one port.

How do two firewalls help protect a public web host?

Two firewalls force traffic to pass through two separate sets of rules. The outer wall filters public web requests before they hit your host. The inner wall stops a breached host from reaching your private internal systems.

Why do firewall rules miss risky admin commands?

Standard firewall rules only check network addresses and port numbers at login. Once the port opens, the firewall lets all encrypted traffic flow through. It cannot see individual shell commands or database statements inside that active session.

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.