Join our Newsletter — 33% off our NHI Course
Home› Guides› DMZ Design: Screened Subnets for Internet-Facing Services
Guide Network Security

DMZ Design: Screened Subnets for Internet-Facing Services

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 27 November 2026 13 min read
On this page

Every internet-facing service will eventually be attacked, and the DMZ decides whether that attack stops at the edge or reaches the internal network. A demilitarised zone, also called a screened subnet or perimeter network, is a separate network segment for systems that must accept connections from the internet, with firewall policy on both its internet side and its internal side. This guide is for network architects designing or reviewing that segment: the main design patterns, what should and should not sit in it, a traffic rule matrix, how to manage DMZ hosts without opening a path inwards, and how the same thinking maps to public cloud and zero trust. Wider zone design and east-west policy are covered in the Network Segmentation Guide; this page goes deeper on the internet edge only.

Key takeaways

  • Terminate, inspect, re-originate. Internet connections should end on a DMZ proxy or gateway, which then opens a new, filtered connection to a named back end, never a straight port-forward to an internal server.
  • Deny by default in all three directions. Internet to DMZ, DMZ to internal and DMZ to internet each need an explicit allow list; outbound from the DMZ is the direction most often left open.
  • Assume DMZ hosts will be compromised. Keep credentials, directory trust and management paths off them so a compromise stays contained.
  • Management traffic never enters from the internet side. Administer DMZ hosts from a dedicated management network or jump service, with its own authentication and logging.
  • The pattern survives in cloud and zero trust. Public subnets, load balancers and per-request access checks are today's screened subnet; the principle of no implicit trust from network position is the same.

What a DMZ is

NIST SP 800-41 Rev. 1, Guidelines on Firewalls and Firewall Policy, notes that there is no single technical definition of a DMZ. In practice a DMZ is a firewall interface or segment for hosts that are reachable from outside, where traffic between the DMZ and the protected network still passes through the firewall and is subject to its policy. The same publication observes that public-facing servers such as web and email servers are commonly placed there, and recommends that firewalls block all inbound and outbound traffic not expressly permitted.

NIST SP 800-53 Rev. 5 control SC-7 Boundary Protection asks organisations to implement subnetworks for publicly accessible system components that are physically or logically separated from internal networks. SC-7(5) Deny by Default, Allow by Exception sets the rule posture. In MITRE ATT&CK v20 terms, the DMZ limits what follows T1190 Exploit Public-Facing Application and T1133 External Remote Services, and it implements mitigation M1030 Network Segmentation (D3FEND D3-NI Network Isolation).

Design patterns (single, dual firewall, three-legged)

PatternHow it worksStrengthsTrade-offsFits
Three-legged (single firewall)One firewall with three interfaces: internet, DMZ, internal. Policy on the firewall controls every pairSimple, one rule base, low costThe firewall is a single point of failure and a single point of compromise; one misconfiguration can expose both zonesSmall and mid-sized sites, branch offices
Dual firewall (back-to-back)An outer firewall between internet and DMZ, an inner firewall between DMZ and internal network. Often different products or rule ownersDefence in depth: compromising the outer layer does not open the inner one; separate change control per boundaryTwo rule bases to keep coordinated (SP 800-41 warns inner and outer policies must be aligned); more cost and operationsRegulated environments, data centres, high-value services
Multiple DMZsSeparate DMZ segments by function or trust: public web, partner/B2B, mail, remote accessA breach of one service does not reach the others; rules stay readableMore segments to route and monitorLarge estates with several classes of external user
Reverse proxy onlyA proxy or application delivery tier in the DMZ; application servers stay internal and accept connections only from the proxyThe smallest DMZ footprint; WAF and TLS inspection in one placeThe proxy becomes a high-value target; must be patched quicklyWeb and API publishing

Choosing: a three-legged design is reasonable where there is one firewall team, a short list of services and good rule review. Move to dual firewalls when an outer-layer compromise would have high impact, when different teams own the edge and the core, or when a regulator or assessor expects layered boundaries. Add separate DMZs once you publish services to distinct audiences, such as customers and partners. Small organisations often gain more from a managed reverse proxy or content delivery service in front of a minimal DMZ than from a second firewall.

What belongs in the DMZ

Belongs in the DMZStays internalWhy
Reverse proxies, load balancers, WAFApplication servers behind themThe proxy terminates internet sessions; the app server only sees filtered traffic from a known source
Mail relay or secure email gatewayMailbox serversThe relay accepts SMTP (TCP 25) from the internet and forwards to the internal mail system
External DNS (authoritative for public zones)Internal DNS and directory-integrated DNSPublic records only; never expose internal zone data
Remote access gateways (VPN, VDI, ZTNA connectors where applicable)Directory and identity providersGateways authenticate against back ends over tightly scoped ports
Public file transfer front endsFile stores and processing systemsFiles are scanned and passed inwards by a controlled process
NothingDatabases, domain controllers, management consoles, backup serversThese hold the data and credentials an attacker wants next

Hosts in the DMZ should not be joined to the production directory forest and should not hold reusable privileged credentials. Edge appliances are identity systems in their own right: in the Ivanti Connect Secure exploitation, attackers harvested user passwords and service account credentials stored on internet-facing VPN gateways, and CISA advised treating those stored credentials as compromised. Inventory every secret held on a DMZ device and be ready to rotate it.

Traffic rules and management access

Write rules as a matrix and review each cell. The examples below are typical defaults to adapt, not a complete rule base.

Source to destinationDefaultTypical allowed exceptionsNotes
Internet to DMZDenyTCP 443 (and 80 for redirect) to the proxy; TCP 25 to the mail relay; UDP and TCP 53 to external DNS; the VPN gateway's published portsPublish by destination address and port only; rate-limit and use DDoS protection upstream
DMZ to internalDenyNamed proxy to named app server on the application port; mail relay to mailbox server on SMTP; gateway to identity provider on its documented portsThe most important cell: one source, one destination, one port per rule; no "any" in any field
Internal to DMZDenyManagement network to DMZ hosts on SSH (22) or RDP (3389) or agent ports; monitoring and log collectionOnly from the management segment, never from user networks
DMZ to internetDenyUpdate repositories, certificate revocation and ACME endpoints, mail relay outbound SMTPEgress filtering stops reverse shells and data exfiltration from a compromised host; SP 800-41 also recommends blocking outbound traffic with invalid source addresses
DMZ host to DMZ hostDenyLoad balancer to its pool membersUse host firewalls or private VLANs so one compromised host cannot scan its neighbours
Internet to internalDeny, no exceptionsNoneAny rule here bypasses the DMZ; treat it as a finding

Jump host and management plane

  • Separate management interfaces: put DMZ host and firewall management interfaces on an out-of-band or management VLAN that is not routable from the DMZ data plane or the internet.
  • Jump service: administrators connect to a hardened jump host or a brokered access service in the management zone, authenticated with phishing-resistant MFA, and from there to DMZ hosts. Record sessions. See If your jump host and bastion is compromised for the response side.
  • No inbound admin from the internet: SSH and RDP are never published to the internet. Remote administrators come in through the remote access service first, then the jump host.
  • Machine credentials: deployment pipelines and monitoring agents that reach DMZ hosts use their own scoped, rotated credentials, held in a secrets manager rather than on the hosts.
  • Change control: SP 800-41 recommends managing rule sets through formal change management and reviewing them periodically. See the Firewall Management Guide and the Firewall Rule Review Checklist.

Cloud equivalents

Cloud networks do not have a physical DMZ, but the screened subnet maps cleanly onto provider building blocks. Providers are listed alphabetically; each row describes customer-side configuration from the provider's documentation.

ProviderScreened subnet building blocksManagement access without public admin ports
Amazon Web ServicesA public subnet has a direct route to an internet gateway; a private subnet does not and uses a NAT device for outbound access. Put load balancers in public subnets and instances in private subnets; security groups allow traffic per resource and network ACLs add subnet-level allow and deny rules (the default network ACL allows all traffic, so set your own)Systems Manager Session Manager reaches managed nodes without open inbound ports, bastion hosts or SSH keys, with IAM-controlled access and session logging to CloudWatch Logs or S3
Google CloudExternal load balancers in front of VMs that have no external IP address; VPC firewall rules restrict ingress to load balancer and health check rangesIdentity-Aware Proxy TCP forwarding tunnels SSH and RDP to VMs without external IPs; allow ingress only from 35.235.240.0/20 on the needed ports and grant roles/iap.tunnelResourceAccessor
Microsoft AzureHub-spoke topology with a perimeter network firewall in the hub; Azure Firewall in AzureFirewallSubnet (a /26 subnet) inspects traffic, and user-defined routes send spoke traffic through it. Inbound web traffic can terminate on a reverse proxy such as Application Gateway or Front Door, passing the client address in X-Forwarded-ForAzure Bastion in AzureBastionSubnet provides RDP and SSH over TLS on port 443 to VMs that have no public IP address

The common thread: only the load balancer or proxy tier is internet-reachable, workloads stay private, and admin access goes through an identity-checked broker. Egress still needs filtering; see Cloud Egress Filtering. For the web tier itself, see the Load Balancer Security Guide and the Web Application Firewall Guide.

Where zero trust fits

NIST SP 800-207 rejects implicit trust based on network location: every access request is authenticated and authorised on its own merits. That does not remove the DMZ. It changes what the DMZ is trusted for. Keep the screened subnet as a containment boundary for exposed systems, and add per-request identity checks on the connections that cross it, for example mutual TLS between proxy and back end, or access brokers in place of broad VPN reach. See the NIST SP 800-207 Zero Trust Architecture Guide and Microsegmentation vs ZTNA.

Rolling out or redesigning a DMZ

  1. Inventory exposure: list every public IP, published port and DNS record, and map each to a host and owner. Compare with an external scan.
  2. Classify services: decide which belong in the DMZ, which can move behind a reverse proxy, and which should not be exposed at all.
  3. Build the matrix: write the six-cell rule matrix above for each service before changing anything.
  4. Stand up the new segment in parallel: deploy the DMZ and management paths, move one low-risk service, and test with logging-only egress rules first.
  5. Migrate in waves: move services one at a time behind the proxy, switch DNS, and keep the old path available for quick rollback until monitoring is clean.
  6. Enforce egress: after a week or two of logging, turn outbound rules from log to deny.
  7. Remove old paths: delete legacy port-forwards and any internet-to-internal rules, then rescan from outside.

Detection and measurement

  • Log: firewall allow and deny events for every DMZ boundary, proxy and WAF logs, and authentication logs from DMZ hosts and the jump service.
  • Alert on: any new connection from a DMZ host to an internal address outside the allow list; DMZ hosts initiating outbound connections to unknown destinations; admin logins that did not come through the jump service.
  • Metrics: number of internet-to-internal rules (target zero); share of DMZ-to-internal rules with a single source, destination and port; count of DMZ hosts with unrestricted egress; mean time to patch internet-facing systems; share of admin sessions brokered and recorded.

Common failure patterns

  • Port-forwarding to internal servers: a NAT rule from the internet straight to an internal host means the DMZ is decorative.
  • Open egress: DMZ hosts allowed to reach any internet address make it easy to download tooling and exfiltrate data after a compromise.
  • Domain-joined DMZ hosts: a compromised web server with a computer account or cached admin credentials gives an attacker a foothold in the directory.
  • Credentials stored on edge devices: service account passwords and keys on VPN or proxy appliances become an attacker's next step, as the Ivanti case showed.
  • Management on the data plane: SSH or appliance admin consoles reachable from the DMZ or the internet.
  • Rule drift: temporary "any" rules added during incidents or migrations and never removed; review against the matrix on a schedule.

Framework mapping

FrameworkReferenceHow this page applies
NIST SP 800-53 Rev. 5SC-7, SC-7(5), SC-7(21)Separated subnetworks for public components, deny by default, isolation of components
NIST SP 800-53 Rev. 5AC-17, AC-17(3)Remote and administrative access through managed access control points
NIST CSF 2.0PR.IR-01Networks and environments protected from unauthorised logical access
CIS Controls v8.1Control 12 Network Infrastructure ManagementEstablish, implement and actively manage network devices
MITRE ATT&CK v20 and D3FENDT1190, T1133, M1030, D3-NIContaining exploitation of exposed services through segmentation

Practitioner checklist

  • Inventory every internet-facing address, port and DNS record with an owner.
  • Place only proxies, gateways, relays and public DNS in the DMZ; keep data and identity systems internal.
  • Write and review the six-cell rule matrix; no "any" in DMZ-to-internal rules.
  • Remove every internet-to-internal rule and port-forward.
  • Filter DMZ egress to named destinations.
  • Keep DMZ hosts out of the production directory and free of reusable privileged credentials.
  • Manage DMZ hosts only from a management network through a jump service with MFA and session recording.
  • In cloud, keep workloads in private subnets and use brokered admin access instead of public SSH or RDP.
  • Patch internet-facing systems on an accelerated schedule and rescan from outside after changes.

Standards and references

Related NHI Mgmt Group resources: Network Segmentation Guide · Firewall Management Guide · Web Application Firewall Guide · NIST SP 800-207 Zero Trust Architecture Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.