DMZ Network Design with Public and Private Segments
Advanced DesignQuestion
Design a DMZ architecture using a public block of 203.0.113.0/28 (for externally reachable services) and a private block of 10.0.100.0/24 (for internal DMZ communication). Place four services in the DMZ: web, mail, dns, and vpn. Assign a public IP to each service and a private subnet for internal management traffic.
Given
{
"public_block": "203.0.113.0/28",
"private_block": "10.0.100.0/24",
"services": [
"web",
"mail",
"dns",
"vpn"
]
}
Answer
{
"public_assignments": {
"network": "203.0.113.0",
"broadcast": "203.0.113.15",
"usable_range": "203.0.113.1 - 203.0.113.14",
"usable_count": 14,
"service_ips": {
"web": "203.0.113.1",
"mail": "203.0.113.2",
"dns": "203.0.113.3",
"vpn": "203.0.113.4"
},
"reserved_for_growth": "203.0.113.5 - 203.0.113.14"
},
"private_management_subnets": {
"web_mgmt": "10.0.100.0/28",
"mail_mgmt": "10.0.100.16/28",
"dns_mgmt": "10.0.100.32/28",
"vpn_mgmt": "10.0.100.48/28"
}
}
Try to solve it first, then click Reveal Answer
Step-by-Step Explanation
Step 1: Analyze the public /28 block
203.0.113.0/28: - /28 = 16 total addresses - Network address: 203.0.113.0 - Broadcast address: 203.0.113.15 - Usable range: 203.0.113.1 – 203.0.113.14 (14 addresses) - Mask: 255.255.255.240
With 4 services requiring public IPs, we have 14 usable and only need 4. 10 remain for load balancers, redundant interfaces, or future services.
Step 2: Assign one public IP per service
| Service | Public IP | Purpose |
|---|---|---|
| Web | 203.0.113.1 | HTTPS (443), HTTP (80) |
| 203.0.113.2 | SMTP (25), IMAPS (993) | |
| DNS | 203.0.113.3 | UDP/TCP 53 |
| VPN | 203.0.113.4 | UDP 1194 (OpenVPN) or 500/4500 (IPsec) |
Step 3: Design private management segments (10.0.100.0/24)
Each service gets a /28 on the private side for management traffic:
10.0.100.0/28 → Web management (.1 - .14 usable)
10.0.100.16/28 → Mail management (.17 - .30 usable)
10.0.100.32/28 → DNS management (.33 - .46 usable)
10.0.100.48/28 → VPN management (.49 - .62 usable)
10.0.100.64/24 → (reserved)
Step 4: Firewall rules for a proper DMZ
[Internet] ──(public IPs)──> [Firewall 1] ──> [DMZ]
│
[Internal LAN] <──────────[Firewall 2]──────── [DMZ]
Inbound rules (Internet → DMZ): - ALLOW 203.0.113.1:443 (web HTTPS) - ALLOW 203.0.113.2:25 (mail SMTP inbound) - ALLOW 203.0.113.3:53 (DNS queries) - ALLOW 203.0.113.4:VPN_PORT (VPN) - DENY all else
Outbound rules (DMZ → Internet): - ALLOW 203.0.113.2 → SMTP relay outbound - ALLOW 203.0.113.3 → UDP 53 (DNS recursion) - DENY DMZ → internal LAN (critical!)
Step 5: Why separate public and private interfaces?
Using dual-homed servers (one public NIC, one private NIC): - Management traffic never traverses the public internet - Reduces attack surface: SSH on private IP only (10.0.100.x) - Enables out-of-band monitoring without interrupting service