Security · 5 min read · 30 November 2026

What Is a DMZ in Networking? How a Demilitarised Zone Protects Your LAN

A DMZ is a separate network zone for servers the internet must reach. How it works, the firewall rules it needs, and why a router's "DMZ host" is not a DMZ.

A DMZ (demilitarised zone) is a separate network segment that sits between the internet and your internal LAN. It holds the servers that outsiders must reach, such as a public web server or mail relay, so that if one of them is compromised, the attacker is still kept away from your internal network.

How a DMZ works

The firewall has three zones: the internet, the DMZ and the internal LAN. Traffic between them is controlled by rules:

From → ToTypical rule
Internet → DMZAllow only the published services, for example HTTPS (TCP 443) to the web server
Internet → LANDeny everything
DMZ → LANDeny by default; allow only specific, documented connections (for example the web server to one database port)
LAN → DMZAllow administration from a management network only
DMZ → InternetAllow only what the servers need, such as updates and DNS

The key idea is that the DMZ is trusted less than the LAN: a server in the DMZ cannot freely open connections inward.

Single-firewall and dual-firewall designs

  • Three-legged firewall: one firewall with separate interfaces or VLANs for internet, DMZ and LAN. Common in small and medium businesses.
  • Two firewalls in series: an outer firewall between the internet and the DMZ, and an inner firewall between the DMZ and the LAN. Used where security requirements are higher.

The "DMZ host" setting on home routers

Many consumer routers have a "DMZ" option that forwards every incoming port to one device on the LAN. That is not a real DMZ: the device is fully exposed and still sits inside your network. Avoid it, and publish only the specific ports a service needs (see NAT and port forwarding).

Good practice

  • Keep DMZ servers patched and hardened, and log all traffic that crosses zone boundaries.
  • Never put file servers, domain controllers or NVRs in the DMZ.
  • For remote access to internal systems, use a VPN or zero-trust access instead of publishing them (see ZTNA vs VPN).
  • Put a web application firewall in front of public web applications.
  • Write the rules down and review them regularly: firewall rule best practices.

A secure internet gateway with separate zones and per-zone rules is all a small business needs to build a proper DMZ.

FAQ

Frequently asked questions

What is a DMZ in networking?

A separate network zone between the internet and the internal LAN that hosts public-facing servers. Firewall rules let the internet reach only those servers and stop the DMZ from connecting freely into the LAN.

What should be placed in a DMZ?

Services that outside users must reach directly, such as public web servers, mail relays and reverse proxies. Internal systems such as file servers, directory servers and NVRs should stay on the LAN.

Is a router's DMZ host setting safe?

No. It forwards all incoming ports to one LAN device, exposing it completely while it still sits on your internal network. Forward only the ports a service needs, or use a VPN.

Do I need two firewalls for a DMZ?

No. A single firewall with three zones (internet, DMZ, LAN) is common and effective. Two firewalls in series add defence in depth where requirements are stricter.

Need help designing your network?

Navijin engineers provide free design consultations, bills of materials and quotations for business projects.