Gotham AD Masterclass — Episode 0
A domain controller that installs isn’t the same as a domain controller that works. Most tutorials skip the network and stop at the reboot, and most of the problems live in exactly those two places. (A viewer called me out on the first one: “How are you going to set up a home lab, and you don’t even set up the network?” Fair. So this build starts with the network.)
This is the prequel to the Gotham AD Masterclass, a series where I build Wayne Enterprises’ entire IT department in Active Directory. Before anyone gets hired, somebody has to build the city. So this post covers Gotham’s own network (a UniFi VLAN in its own firewall zone) and a Windows Server 2025 domain controller for gotham.lab, patched before promotion, at the 2025 functional level. I also break its DNS on purpose, the way home labs usually break, and fix it.
Why Server 2025
It’s the newest, it’ll be supported the longest, and it’s what you’ll be walking into at work. It also has a couple of things that bite if nobody warns you. Consider yourself warned.
The three names you can’t change
| Name | Value |
|---|---|
| Domain | gotham.lab |
| NetBIOS (short) name | GOTHAM |
| Server | GOTHAM-DC01 |
Don’t use .local. It’s reserved for mDNS, which printers and Macs use to find each other, and an AD domain on it clashes with that. In production, use a subdomain of a domain the company owns (ad.wayne-enterprises.com). In a lab, .lab is fine.
Step 1: Lay the roads (the network)
If you build a lab on your home network, the first client you add asks your home router for an address, gets told the wrong place to look for DNS, and can’t find the domain. It also puts your lab next to your family’s devices. So Gotham gets its own network before any server exists.
I’m on a UniFi Cloud Gateway Ultra running Network 10.6:
| Setting | Value |
|---|---|
| Network | New Virtual Network: Gotham |
| VLAN ID | 20 |
| Gateway / subnet | 192.168.20.1/24 |
| DHCP | None. The DC hands out addresses later; two DHCP servers on one network is trouble |
Firewall: Settings → Security → Zone-Based Firewall → Zones → Create Zone “Gotham”, with the Gotham network in it. A new zone’s defaults do exactly what a lab needs: blocked from your other internal networks, allowed out to the internet and the gateway (Ubiquiti). I used a zone rather than the Isolate Network tick box, because a zone shows you exactly what’s allowed, and Arkham gets one of its own later in the series.
Proxmox: node → System → Network → vmbr0 → tick VLAN aware → Apply Configuration (your connection may blink). If there’s a switch between the gateway and the server, that port must carry VLAN 20.
Step 2: The server
This runs on my $400 Dell R730 under Proxmox. If you haven’t got a hypervisor yet, my Build Your First Home Lab ebook covers it: [EBOOK LINK].
- ISOs: the Windows Server 2025 evaluation (free, 180 days) and the VirtIO drivers. I’m using virtio-win 0.1.271, because a newer release had reported disk problems on Server 2025. Check the Proxmox wiki for the current advice.
- VM: guest type Windows 11/2022/2025, the VirtIO driver drive ticked, Qemu Agent on, 60 GB SCSI, 4 cores, 8 GB, VirtIO NIC with VLAN tag 20.
- Setup: pick Standard Evaluation (Desktop Experience). When the disk list is empty, Load driver →
vioscsi\2k25\amd64. - After install: run
virtio-win-guest-tools.exe(without it there’s no network), rename, and set a static IP.
Rename-Computer -NewName GOTHAM-DC01 -Restart
New-NetIPAddress -InterfaceAlias Ethernet -IPAddress 192.168.20.10 -PrefixLength 24 -DefaultGateway 192.168.20.1
# Proof the roads work: internet yes, home network no
Test-NetConnection www.microsoft.com -Port 443
Test-Connection <your-home-PC-IP> -Count 2 # should fail
Step 3: Patch first
After Server 2025 launched, Microsoft confirmed a known issue: domain controllers could restart onto the Public firewall profile instead of the domain one. At that point the DC effectively forgets it’s on the domain and blocks the traffic a domain needs. It was fixed by update (KB5060842). So on any 2025 DC, Windows Update runs to completion before promotion.
Step 4: Promote, and say what you want
Install-WindowsFeature AD-Domain-Services -IncludeManagementTools
Install-ADDSForest -DomainName "gotham.lab" -DomainNetbiosName "GOTHAM" `
-ForestMode Win2025 -DomainMode Win2025 -InstallDns
The Win2025 values set the functional level. That decides which features the domain can use and which older DCs may join. This lab only ever has 2025 DCs, so it goes straight to the top. Don’t leave it to a default.
Verify:
Get-ADDomain # DNSRoot gotham.lab, DomainMode 2025
Get-NetConnectionProfile # NetworkCategory should say DomainAuthenticated, NOT Public
Step 5: Break it on purpose
After promotion, the DC points DNS at itself. One of the most common home lab mistakes is pointing it back at the router. So I did exactly that:
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 192.168.20.1
Clear-DnsClientCache
Resolve-DnsName -Type SRV _ldap._tcp.dc._msdcs.gotham.lab # fails
The domain controller can’t find itself. The router has never heard of gotham.lab, so any machine asking it where the DC is gets nothing. Nothing joins, and nobody logs on.
The fix: DCs point at DCs. Its own IP first, loopback second.
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses 192.168.20.10,127.0.0.1
Clear-DnsClientCache
Resolve-DnsName -Type SRV _ldap._tcp.dc._msdcs.gotham.lab # GOTHAM-DC01
Step 6: The inspection
dcdiag runs the full health check. On a brand-new DC you may see a warning or two from first-boot event logs. Read them, but the ones that matter are connectivity, replication and DNS.
The gotchas
- Network first. Its own VLAN, its own zone, DHCP off until the DC takes over.
- Patch before promotion on 2025. The firewall-profile bug is fixed, but only if you’ve installed the fix.
- Pin your VirtIO version and check it’s current.
- Set the functional level explicitly.
- DNS on a DC never points at the router.
- Snapshot here. This empty, healthy DC is the starting point for everything that follows.
What’s next in Gotham
Gotham’s built, and nobody lives here yet. Next episode, 35 people move in: a real org chart, a whole company hired with one script, the everyday work of people joining, moving and leaving, and a lockout policy the Joker runs straight into. One of those 35 is a contractor who picked his own username.
Tags: homelab, active directory, windows server 2025, proxmox, unifi, vlans, dns, gotham ad masterclass
— Trev | I broke it. Fixed it.

