Everything in my lab runs on one Proxmox host behind a pfSense VM. I wanted three networks instead of one: servers, workstations and management, with workstations allowed to reach only what they need on the domain controller, and internet access that means the internet and nothing internal.
Why segment
On a flat network, a compromised workstation can talk to every server, including the domain controller and the firewall’s own admin page. Segmentation is what stops that. Microsoft’s cloud security benchmark puts it as preventing unrestricted lateral movement and reducing blast radius when breaches occur [1]. The same idea applies on-prem: separate networks by trust level, then allow only the traffic each one needs.
Bridges and VLANs on Proxmox
The Proxmox host has two Linux bridges. vmbr0 is bound to the physical NIC and faces the home network. That’s pfSense’s WAN. vmbr1 has no physical port at all and carries every lab network. That’s pfSense’s LAN side.
vmbr1 has to be VLAN aware, so each VM’s network card can be given a VLAN tag that the bridge carries [2]. In the Proxmox UI that’s System > Network > vmbr1 > Edit > VLAN aware. My first tagged VM wouldn’t even start until I turned this on. A second VM got a self-assigned 169.254 address instead of DHCP. The cause was the Firewall checkbox on its Proxmox network device, which inserts an extra bridge chain that wasn’t passing the VLAN tag through. Unchecking it and fully stopping and starting the VM fixed it.
Three networks in pfSense
On pfSense, I created two VLANs on the LAN interface and assigned each one as its own interface [3]:
| Network | Tag | Example subnet | What lives there |
|---|---|---|---|
| Servers | untagged | 192.168.10.0/24 | Domain controller, sync server |
| Workstations | 20 | 192.168.20.0/24 | Domain-joined clients |
| Management | 30 | 192.168.30.0/24 | Reserved for admin VMs |
DHCP stays on the domain controller, so pfSense relays requests from the two VLANs to it. The relay forwards requests to a server on another segment, and the DHCP server has to be disabled on every interface where the relay runs [4]. The domain controller has a matching scope for each VLAN.
Firewall rules for the workstation VLAN
Each VLAN interface starts with nothing allowed. The workstation rules allow:
| Protocol | Destination | Ports | Why |
|---|---|---|---|
| UDP | any | 67-68 | DHCP relay |
| TCP/UDP | domain controller | 53, 88, 389, 445 | DNS, Kerberos, LDAP, SMB |
| TCP | domain controller | 135 | RPC endpoint mapper |
| TCP | domain controller | 49152-65535 | Dynamic RPC, needed for domain join |
| UDP | domain controller | 123 | Time sync |
| ICMP | any | none | Ping for troubleshooting |
| TCP | not RFC 1918 | 80, 443 | Internet only |
Those AD ports are Microsoft’s published requirements for domain members talking to domain controllers [5]. I added the RPC rules after a domain join failed with “RPC server is unavailable”, and the NTP rule after hybrid join failed on a clock problem.
Internet means not private
The internet rules first had a destination of *. That allows ports 80 and 443 to anywhere, which includes every internal web server and pfSense’s own admin page on the VLAN gateway address. A compromised workstation could have attacked the firewall’s login page directly.
The fix is to allow anything that is not a private address. RFC 1918 reserves three blocks for private networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16 [6]. In pfSense, an alias is a named group of hosts, networks or ports that rules can reference [7]:
- Firewall > Aliases > Add: name
RFC1918, type Network(s), and the three networks on three separate rows, each with its own mask (8, 12 and 16). - In each “Allow internet” rule, set the destination to Single host or alias
RFC1918and tick Invert match. - Save and apply.
The rule now reads “allow 80 and 443 to anything that isn’t a private address”. I applied the same change to the management VLAN.
Don’t lock yourself out first
I was managing pfSense from a workstation’s browser at the VLAN gateway address, which only worked because of the gap I was closing. Before changing the rules, I made sure I could reach the web UI from the server network. pfSense enables an anti-lockout rule by default that keeps the web interface reachable from the LAN [8], so the LAN side stays a safe way in. The Proxmox console of the pfSense VM is the emergency path if everything else fails.
Testing it
From a workstation, after applying the rules:
https://www.microsoft.comstill loads.https://<workstation-vlan-gateway>(the pfSense admin page) times out.
Both results are the point. The first proves internet access still works. The second proves the workstation can no longer reach the firewall’s admin page.
Comment section
Sorry babes, you have to sign into Github to comment. Feel free to let me know what's on your mind!