Bookmarks

DMZ — demilitarised zone

Demilitarized Zone

A network segment that holds services reachable from the internet, so that compromising them does not open a path into the internal network.

Also: DMZ segment, DMZ network, perimeter network, screened subnet

checked 9 Nov

All terms

The term comes from the military: a demilitarised zone is a neutral strip between opposing sides. In networks it is a buffer between the internet and the internal network, holding whatever must be reachable from outside: websites, mail servers, reverse proxies.

Why a separate segment

Public services accept connections from anyone, so they are attacked most often. If such a service sits directly on the internal network, compromising it gives an attacker a path to workstations, databases and file servers. A compromise of a service in the DMZ stays local: the firewall blocks any onward traffic.

  • From the internet to the DMZ: only the ports that are needed, such as 443 for a website and 25 for mail.
  • From the DMZ to the internal network: everything is denied by default, and only specific requests are allowed, for example a web server reaching a database server.
  • From the internal network to the DMZ: only what is needed for updates and administration.
  • From the internet to the internal network: nothing except replies to outgoing requests.

Typical layouts

There is no single technical definition of a DMZ, as NIST points out in its firewall guidelines. In practice the name is used both for a separate firewall interface and for a network between two firewalls; in the cloud, subnets play the same role.

LayoutHow it works
One firewall, three interfacesthe firewall connects the internet, the DMZ and the internal network, and filters traffic between all three
Two firewallsthe outer firewall lets only public traffic into the DMZ, and the inner one sits between the DMZ and the internal network
Clouda public subnet with public addresses and private subnets inside a virtual network; security groups and route tables play the role of firewalls

One firewall with three interfaces is the typical choice for a small network: it is cheaper and simpler to configure. Two firewalls provide defence in depth: compromising the outer one does not open a path to the internal network, and the rules on the outer and inner firewalls are configured independently.

Example rules

textPseudo firewall rules for a website in a DMZ
# internet -> DMZ: web port onlyallow tcp dport 443 -> 203.0.113.10# DMZ -> internal network: deny by defaultdeny ip 203.0.113.0/24 -> 10.0.0.0/8# exception: the web server talks to its own DBMSallow tcp 203.0.113.10 -> 10.0.1.20 port 5432

The zero-trust approach weakens the role of the network perimeter: every request is verified on its own, not by its place in the network. Even in that model, public services are given an isolated part of the network: a DMZ in a classic estate or a public subnet in the cloud.

Sources

the term is written from these pages

Verified 9 Nov

Not to be confused with

what it is mixed up with and how it differs

  • firewall

    A firewall is a device that filters traffic, whereas a DMZ is a network segment that such firewalls separate from the rest.

  • VPNvirtual private network

    A VPN lets trusted users into a closed network; a DMZ is a zone for services exposed to the untrusted internet.

In depth in the references

where the topic is covered in detail