A DMZ is a controlled route, not a safe place by definition
A web service has to accept traffic from the internet, but its database usually does not. A demilitarized zone (DMZ), also called a perimeter network, gives those two systems different exposure. Public users can reach a tightly scoped service in the DMZ, while routes from that service toward internal applications have separate firewall rules. The purpose is to reduce the opportunities an attacker has after one exposed host fails. A DMZ cannot make the host trustworthy or guarantee that compromise stays inside one subnet.
Consider a customer portal: an external browser reaches a reverse proxy on TCP 443. The proxy contacts the application tier on a specified internal port; that application connects to a database only from approved addresses. The firewall should not permit the proxy to browse the entire internal network. This is the important distinction between merely creating a subnet named “DMZ” and controlling which systems can actually communicate.
Start with the traffic paths, not with a firewall diagram
Before creating rules, list every justified flow as a source, destination, protocol, port, identity if available, and operational owner. For the portal, the first row might be internet clients to the reverse proxy over HTTPS. The second might be proxy to application servers over an internal encrypted endpoint. A management flow belongs in a separate administrative path, ideally using privileged identity checks and an approved jump service rather than accepting remote administration from the internet.
Specify the reverse direction as well. Return traffic for an established connection is different from permitting an exposed DMZ host to initiate any connection inward. A stateful firewall can track legitimate replies, but source translation, asymmetric routing, inspection profiles and separate security zones may change the result. Test the actual path and do not infer security from a diagram alone.
DNS resolution, certificate renewal, package updates, backups and logging need deliberate treatment. An application may need to resolve an internal service name without being granted the ability to query arbitrary internal hosts. A logging collector might receive a push from a DMZ server, or the server may push logs outward to a hardened receiver. Either choice creates a dependency that has to be documented.
Separate exposure, administration and sensitive data
A traditional design uses external, DMZ and internal zones. These may map to separate firewall interfaces, routed subnets, VLANs or cloud network segments; the labels alone create no access policy. In a cloud deployment, load balancers, subnets, route tables, security groups and workload firewalls collectively define the perimeter. A publicly reachable load balancer does not require every application instance behind it to have a public address.
Do not place credentials, database backups or domain controllers on a public-facing server because the DMZ supposedly protects them. Secrets should be retrieved through narrowly authorized channels; the application should use a restricted service identity, and a database account should have only the permissions needed for that workload. If the exposed tier is taken over, those permissions determine how far an attacker can move.
Administrative access is frequently the most dangerous exception. A rule that admits unrestricted RDP or SSH from a broad office address range can undermine all the other segmentation work. Use controlled access, strong authentication, recorded administrative sessions where appropriate, and regular review of emergency exceptions. A network placement decision never replaces host hardening and patch management.
What the firewall should enforce
Write explicit allow rules for business-required flows and evaluate the platform’s actual default behavior. Some products implement a terminal deny policy; others may permit certain same-zone traffic by default. For a DMZ, check both inbound internet-to-DMZ rules and DMZ-to-internal rules. A rule allowing HTTPS to the public reverse proxy does not mean HTTPS should be allowed to every internal host.
Threat prevention, TLS inspection and web application protection can add value but have coverage limits. A web application firewall may catch certain malicious requests yet miss compromised credentials or flawed object-level authorization. Endpoint telemetry helps identify behavior after a successful exploit. Even with those layers, a permitted application query can become a route to internal data unless the application and downstream account permissions are controlled.
Test the negative cases deliberately. From a controlled DMZ test host, verify that a connection to an unrelated database port is denied. Check that network management interfaces cannot be reached from the public interface. Confirm a blocked attempt appears in an appropriate log and that the source and destination are correctly identified. Do not conduct these tests against unauthorized systems.
Make failure and recovery part of the design
A real service may depend on DNS, identity, certificate status, routing and a backend connection. Removing a firewall rule can break an application even when the public HTTPS listener remains healthy. Record these dependencies in the change request; test through the actual entry point after deployment and confirm the health check reaches more than a static landing page.
For high availability, consider both firewall failover and application failover. Existing sessions may reset; a healthy load balancer does not guarantee the database is reachable. Use clearly defined restoration expectations and a rollback plan for changes to route tables and zone policies. A DMZ is meant to reduce blast radius, not to promise zero downtime.
Investigate the breach scenario, not just the normal path
Suppose an attacker acquires control of the web tier. Inventory which credentials are present, which internal systems are accessible, and whether the workload can modify important files or submit arbitrary queries. The most useful question is not “Is there a DMZ?” but “What can a compromised DMZ process actually do?” This test exposes wide internal firewall rules, excessive database permissions and unmonitored service accounts.
Logs should distinguish a normal customer request from the web server initiating unusual outbound connections. Retain firewall decisions and relevant application evidence long enough for investigation under the organization’s retention rules. A compromised system can hide its own logs, so protected central collection is useful. Segmenting backups and management networks keeps a breach of the customer-facing tier from automatically undermining recovery.
A cloud perimeter still needs deliberate egress control
In a cloud environment, it is easy to focus only on inbound internet access. Yet a compromised public workload can abuse permitted outbound connections to retrieve packages, contact unexpected endpoints or reach internal service APIs. Record the required outbound destinations and reduce open-ended permissions wherever the application permits. Routing an application through a private subnet is not enough if network rules still permit broad lateral connections.
Consider an API deployed behind a public load balancer. Its compute instances should be private, and only the load balancer should forward to their listener. The database should accept calls only from approved application identities or network paths. Test whether an individual application instance can reach a different internal application or administrative endpoint. If it can, the diagram’s “private” label has given false comfort.
Central control requires ownership. Cloud network policies, host firewalls and application identity rights might be maintained by different teams. Review all three after major changes rather than checking only the load balancer configuration. Treat a policy exception as a documented dependency with an expiration or scheduled review date.
When this architecture makes sense
Use a DMZ or its cloud equivalent for services that must be reachable by less-trusted clients while protecting sensitive internal systems. A small single-purpose API may need only a properly configured ingress and private backend, while a large enterprise might require several tiers with different inspection policies. Complexity is justified only when the rules can be operated, tested and understood.
A successful DMZ deployment has an inventory of intended communications, explicit controls for prohibited paths, hardened public-facing workloads, a separate administration model and evidence that both normal and denied traffic behave as expected. Its value is controlled exposure and containment, not a magic security boundary.