omar@omr.sh:~/notes$

Standing up a DMZ segment on OPNsense

2026-09-24 opnsense · proxmox · networking · dmz

I wanted a public web server in the lab, but I didn’t want a public-facing VM sitting on the same network as the rest of my infrastructure.

The obvious answer was a DMZ.

The less obvious part was deciding where that boundary should actually exist when the firewall itself is a virtual machine running on Proxmox.

Context

Titan is a bare-metal Proxmox host.

OPNsense runs as a VM and acts as the edge router and firewall for the virtual infrastructure behind it.

The internal network already had its own Linux bridge and OPNsense interface. What I wanted was a second, completely separate segment for systems that may eventually receive traffic from the Internet.

The first machine going there would be a small static web server.

The layout

The resulting design is deliberately simple:

                   Internet
                       |
                       |
                  [ OPNsense ]
                   /       \
                  /         \
              LAN             DMZ
               |               |
          internal VMs      public-facing
                              services

The important part is that LAN and DMZ are separate Layer 2 domains.

On Proxmox this means using another Linux bridge rather than attaching the DMZ machines to the existing internal bridge.

A bridge that belongs to nobody

I created a dedicated Proxmox bridge for the DMZ.

The bridge itself does not need an IP address on the Proxmox host.

Conceptually:

vmbr0    upstream / WAN
vmbr1    trusted LAN
vmbr2    DMZ

vmbr2 exists simply to connect virtual interfaces together.

The Proxmox management host is deliberately not a member of that subnet.

That distinction matters.

A Linux bridge does not have to become another management interface just because it carries traffic.

Giving OPNsense a third interface

The OPNsense VM received another VirtIO network adapter connected to the DMZ bridge.

From OPNsense’s point of view the topology then became:

WAN
LAN
DMZ

OPNsense owns the Layer 3 interface for the DMZ and therefore becomes the default gateway for machines living there.

For the examples in this article I am intentionally using generic addressing rather than the real lab configuration.

LAN     10.10.10.0/24
DMZ     10.20.0.0/24
Gateway 10.20.0.1

The exact addresses are not important.

The boundary is.

Firewall policy

Creating another subnet is easy.

The firewall policy is what turns it into a DMZ.

My starting point was:

Internet -> DMZ     only explicitly published services
DMZ      -> LAN     deny
LAN      -> DMZ     allow administration when required
DMZ      -> Internet allow only what the server actually needs

For a static web server that means the externally exposed surface can remain very small.

HTTP and HTTPS may be published to the web server while management remains reachable only from trusted networks.

The DMZ should not become a second LAN just because routing between both networks is technically possible.

The first resident

The first VM placed in the segment is Pulsar.

Its job is intentionally boring:

static files
Caddy
SSH for administration

No development toolchain.

No Hugo.

No source repository.

The website is built elsewhere and the generated static files are deployed to Pulsar.

That separation also means compromising the web server does not automatically give an attacker the development environment or the rest of the internal network.

Testing the boundary

Before considering the segment finished I wanted to verify the behavior rather than just trust the firewall rules.

From the DMZ:

ip route
ip addr

Then verify:

DMZ -> Internet       expected where allowed
DMZ -> LAN            blocked
LAN -> DMZ            allowed only where intended
Internet -> DMZ       only published ports

Firewall logs are considerably more useful here than staring at the rules and assuming they mean what I think they mean.

What I liked about this design

Nothing about it is particularly exotic.

That is the point.

One additional virtual bridge, one additional firewall interface and a small ruleset create a useful security boundary without adding another physical device or another layer of networking abstraction.

Proxmox provides Layer 2.

OPNsense provides Layer 3 and policy.

The workload just sees a normal Ethernet network.

Simple boundaries are easier to understand, and infrastructure I understand is infrastructure I can actually troubleshoot.


← ~/notes