187 lines
12 KiB
HTML
187 lines
12 KiB
HTML
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Windows Server Lab / Project Write-up | Keith Casko</title><link rel="stylesheet" href="../css/industrial.css?v=20261023"><link rel="stylesheet" href="../css/doc-pages.css?v=1"></head><body><a class="skip-link" href="#main-content">Skip to main content</a><div class="site-shell"><header class="metal-panel site-header"><a class="wordmark" href="https://casko.dev/#home" aria-label="Keith Casko home">casko.dev</a><span class="brand-meta">// KEITH CASKO / BYTEGEIST</span><button class="nav-toggle" aria-expanded="false" aria-controls="primary-nav">MENU <span aria-hidden="true">☰</span></button><nav class="site-nav" id="primary-nav" aria-label="Primary"><a href="https://casko.dev/#home">HOME</a><a href="https://casko.dev/#projects">PROJECTS</a><a href="https://casko.dev/#about">ABOUT</a><a href="../assets/resume/Keith_Casko_IT_Cloud_Resume.pdf" download>RESUME</a><a href="https://casko.dev/#contact">CONTACT</a></nav><span class="system-status"><i></i> ALWAYS LEARNING</span></header><main id="main-content" tabindex="-1"><article class="metal-panel document-page"><nav class="document-nav" aria-label="Document navigation"><a href="../homelab.html">← WINDOWS SERVER LAB</a><a href="windows-server-homelab.md" download>DOWNLOAD ORIGINAL MARKDOWN ↓</a></nav><h1>Windows Server / Active Directory Homelab</h1>
|
|
<h2>Objective</h2>
|
|
<p>Build a self-contained Windows Server 2022 Active Directory environment to practice the day-to-day tasks a Help Desk / Junior SysAdmin role actually asks for: domain join, user and group management, OU design, SMB file services, NTFS permissions, DNS, time synchronization, and the troubleshooting loop when something breaks.</p>
|
|
<p>Everything on this page is from the real lab on my workstation. Nothing is fabricated.</p>
|
|
<h2>Architecture</h2>
|
|
<p><img alt="ByteGeist AD homelab topology" src="../assets/images/homelab-topology.svg?v=3" /></p>
|
|
<p>Three virtual machines on VMware Workstation Pro 17, plus an OPNsense firewall VM that sits between the server segment and a separate client segment. A Windows Server 2022 domain controller runs AD DS, DNS, and PDC Emulator duties for the forest; a member server runs SMB file services; a Windows 11 client is domain-joined.</p>
|
|
<h2>Systems</h2>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>System</th>
|
|
<th>OS</th>
|
|
<th>Role</th>
|
|
<th>Address</th>
|
|
<th>Purpose</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>DC01</td>
|
|
<td>Windows Server 2022 Standard</td>
|
|
<td>Domain controller</td>
|
|
<td>192.168.31.10</td>
|
|
<td>AD DS, DNS, PDC Emulator, Schema Master, Global Catalog</td>
|
|
</tr>
|
|
<tr>
|
|
<td>FILE01</td>
|
|
<td>Windows Server 2022 Standard</td>
|
|
<td>Member server</td>
|
|
<td>192.168.31.20</td>
|
|
<td>SMB file services</td>
|
|
</tr>
|
|
<tr>
|
|
<td>WIN11-01</td>
|
|
<td>Windows 11 Education</td>
|
|
<td>Domain client</td>
|
|
<td>192.168.31.x (DHCP, VMnet8)</td>
|
|
<td>Domain-joined workstation</td>
|
|
</tr>
|
|
<tr>
|
|
<td>OPNSENSE</td>
|
|
<td>FreeBSD / OPNsense</td>
|
|
<td>Firewall / router</td>
|
|
<td>VMnet8 ↔ VMnet2</td>
|
|
<td>Separates server and client segments</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<h2>Active Directory</h2>
|
|
<ul>
|
|
<li><strong>Forest / Domain:</strong> <code>ad.bytegeist.lab</code></li>
|
|
<li><strong>NetBIOS:</strong> <code>BGLAB</code></li>
|
|
<li><strong>Forest and Domain functional level:</strong> <code>Windows2016</code></li>
|
|
<li><strong>FSMO roles:</strong> all five held by <code>DC01.ad.bytegeist.lab</code></li>
|
|
<li><strong>Global Catalog:</strong> DC01</li>
|
|
</ul>
|
|
<p>Verified with <code>Get-ADDomain</code>, <code>Get-ADForest</code>, and <code>Get-ADDomainController</code>.</p>
|
|
<h2>DNS</h2>
|
|
<p>AD-integrated primary zones on DC01:</p>
|
|
<ul>
|
|
<li><code>ad.bytegeist.lab</code></li>
|
|
<li><code>_msdcs.ad.bytegeist.lab</code></li>
|
|
<li>Three default reverse-lookup zones</li>
|
|
</ul>
|
|
<p>Clients resolve the domain through DC01. The PDC Emulator (DC01) now synchronizes time externally from <code>time.windows.com</code>, <code>pool.ntp.org</code>, and <code>time.nist.gov</code> — a fix I applied during this audit (see Problems and Fixes).</p>
|
|
<h2>Organizational units</h2>
|
|
<pre><code>ad.bytegeist.lab/
|
|
├── ByteGeist/
|
|
│ ├── Groups
|
|
│ ├── Servers
|
|
│ ├── Workstations
|
|
│ └── Users/
|
|
│ ├── HR
|
|
│ ├── IT
|
|
│ └── Sales
|
|
└── Domain Controllers
|
|
</code></pre>
|
|
<h2>Users and groups</h2>
|
|
<p>Seven lab user accounts distributed across HR, IT, and Sales OUs. All are lab accounts — no production identities or real personal data.</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>OU</th>
|
|
<th>Users</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td>HR</td>
|
|
<td>jwilson, ldavis</td>
|
|
</tr>
|
|
<tr>
|
|
<td>IT</td>
|
|
<td>bsmith, kcasko, sjohnson</td>
|
|
</tr>
|
|
<tr>
|
|
<td>Sales</td>
|
|
<td>mbrown, tmiller</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Seven global security groups under <code>OU=Groups,OU=ByteGeist</code>:</p>
|
|
<blockquote>
|
|
<p>Accounting · Help Desk · HR Employees · IT Employees · Management · Sales Employees · VPN Users</p>
|
|
</blockquote>
|
|
<p>Groups are the access-control building block the lab uses — accounts never get rights directly on resources; groups do.</p>
|
|
<h2>File services</h2>
|
|
<p>FILE01 publishes one departmental share:</p>
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Share</th>
|
|
<th>Path</th>
|
|
<th>Share-level ACL</th>
|
|
<th>NTFS ACL</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><code>IT</code></td>
|
|
<td><code>C:\Shares\IT</code></td>
|
|
<td>Domain Admins = Full; IT Employees = Change</td>
|
|
<td>IT Employees = Modify (explicit); SYSTEM / Administrators = Full (inherited); Users = ReadAndExecute + CreateFiles + AppendData</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<p>Role-based access via group membership: only members of <code>BGLAB\IT Employees</code> get write access to the IT share, with a conservative share-level cap at Change (no share-level Full for regular users). HR and Sales shares aren't published yet; they're planned work.</p>
|
|
<h2>Client domain join</h2>
|
|
<p>WIN11-01 is a domain-joined Windows 11 Education client on the lab NAT network (VMnet8). After the NIC was moved off a bridged physical-LAN adapter and DNS was pointed at DC01, the machine-account secure channel was repaired and verified: <code>Test-ComputerSecureChannel</code> returns <code>True</code>, <code>nltest /dsgetdc:ad.bytegeist.lab</code> locates DC01 (PDC/GC/KDC/DNS flags), and domain authentication succeeds (<code>bglab\administrator</code>). Full before/after detail is in the audit log.</p>
|
|
<h2>Networking</h2>
|
|
<ul>
|
|
<li><strong>VMnet8 (NAT, 192.168.31.0/24)</strong> — hosts DC01, FILE01, and OPNsense's WAN interface.</li>
|
|
<li><strong>VMnet2 (host-only, 192.168.254.0/24)</strong> — OPNsense LAN segment, intended home for domain clients.</li>
|
|
<li>OPNsense is the lab's router/firewall between those segments. The current topology still has servers on VMnet8 rather than behind OPNsense's LAN — honest trade-off I kept so audit traffic stays uncomplicated during build-out.</li>
|
|
</ul>
|
|
<h2>Validation tests</h2>
|
|
<p>Run from DC01 as <code>BGLAB\Administrator</code>, output captured to transcripts on the host:</p>
|
|
<ul>
|
|
<li><code>Get-ADDomain</code>, <code>Get-ADForest</code>, <code>Get-ADDomainController</code> — forest/domain/role data.</li>
|
|
<li><code>Get-ADOrganizationalUnit -Filter *</code> — OU inventory.</li>
|
|
<li><code>Get-ADUser -Filter *</code> + <code>Get-ADGroup -Filter *</code> — identity inventory.</li>
|
|
<li><code>Get-ADComputer -Filter * -Properties OperatingSystem, LastLogonDate</code> — domain members and freshness.</li>
|
|
<li><code>Get-DnsServerZone</code> — zone list.</li>
|
|
<li><code>dcdiag /q</code> — DC health (silent = healthy after the SystemLog fix).</li>
|
|
<li><code>repadmin /replsummary</code> — replication (clean on a single-DC forest).</li>
|
|
<li><code>w32tm /query /source</code> and <code>/status</code> — time hierarchy, verified moving from <code>Local CMOS Clock</code> to <code>time.windows.com</code> (stratum 5).</li>
|
|
<li><code>Invoke-Command FILE01 { Get-SmbShare | Get-SmbShareAccess ; Get-Acl }</code> — share and NTFS evidence.</li>
|
|
<li><code>Test-ComputerSecureChannel</code> on FILE01 → <code>True</code>.</li>
|
|
</ul>
|
|
<h2>Problems found</h2>
|
|
<ol>
|
|
<li><strong>PDC time source was <code>Local CMOS Clock</code>.</strong> On a Windows forest the PDC Emulator is the authoritative time source; every member chains off it. If it drifts, Kerberos tickets outside the 5-minute skew window fail — a classic Help Desk "I can't log in" root cause.</li>
|
|
<li><strong>Stale <code>dcdiag</code> SystemLog failure</strong> from an unexpected shutdown on 2026-08-07.</li>
|
|
<li><strong>My daily account (<code>keith</code>) was a standard Domain User</strong> and couldn't WinRM into FILE01 for remote auditing (correct behavior — only Domain Admins are in the server's local Administrators by default).</li>
|
|
<li><strong>WIN11-01's NIC had drifted to bridged mode</strong>, severing its path to DC01.</li>
|
|
<li><strong>Topology placement:</strong> DC01 and FILE01 sit on NAT (VMnet8) rather than behind OPNsense's LAN, so OPNsense doesn't see server-to-server east-west traffic. Honest reality, not a bug.</li>
|
|
</ol>
|
|
<h2>Fixes performed</h2>
|
|
<ul>
|
|
<li>Set external NTP on the PDC: <code>w32tm /config /manualpeerlist:"time.windows.com,0x9 pool.ntp.org,0x9 time.nist.gov,0x9" /syncfromflags:manual /reliable:yes /update</code>, <code>Restart-Service W32Time</code>, <code>w32tm /resync /rediscover</code>. Verified: <code>w32tm /query /source</code> now returns <code>time.windows.com,0x9</code>, stratum 5.</li>
|
|
<li>Cleared the stale System event log (<code>wevtutil cl System</code>); re-ran <code>dcdiag /q</code> — clean.</li>
|
|
<li>Added <code>keith</code> to <code>Domain Admins</code> as a documented lab-maintenance action so future audits run as my daily account instead of needing an Administrator sign-in each time. Lab-only elevation; this account has no production use.</li>
|
|
</ul>
|
|
<p>Client restoration (completed 2026-10-03, VMware GUI + guest PowerShell):</p>
|
|
<ul>
|
|
<li>Removed WIN11-01 snapshots, virtual TPM, and vmx encryption.</li>
|
|
<li>Switched WIN11-01's network adapter from Bridged to NAT (VMnet8).</li>
|
|
<li>Renewed DHCP, pointed DNS at <code>192.168.31.10</code>, ran <code>Test-ComputerSecureChannel -Repair</code> — returns <code>True</code>; <code>nltest</code> locates DC01 with full PDC/GC/KDC/DNS flags.</li>
|
|
</ul>
|
|
<h2>Security considerations</h2>
|
|
<ul>
|
|
<li>Lab is isolated behind VMware NAT. No inbound exposure to the host network or the internet.</li>
|
|
<li>Audit transcripts live on the host under <code>D:\Repos\ad-lab\transcripts\</code>, not inside a VM.</li>
|
|
<li>No passwords, DSRM, krbtgt, or SIDs are captured in any artifact linked from the portfolio.</li>
|
|
<li>Lab AD is deliberately separate from any production or hybrid identity; nothing in <code>ad.bytegeist.lab</code> has internet-facing roles.</li>
|
|
</ul>
|
|
<h2>Skills demonstrated</h2>
|
|
<p>Windows Server 2022 administration · Active Directory Domain Services · DNS · OU and group design · users and groups · SMB file services · NTFS and share permissions · PowerShell (<code>Get-AD*</code>, <code>Invoke-Command</code>, <code>w32tm</code>, <code>Get-SmbShareAccess</code>, <code>Get-Acl</code>) · VMware Workstation Pro 17 · network segmentation with OPNsense · WinRM remoting · structured troubleshooting · writing honest audit documentation.</p>
|
|
<h2>Future improvements</h2>
|
|
<ul>
|
|
<li>Move DC01 and FILE01 behind OPNsense (VMnet2) so firewall rules actually see server-side traffic — foundation for the Net+/Sec+ firewall drills in my <code>opnsense-lab-networking</code> skill.</li>
|
|
<li>Publish HR and Sales shares with the same RBAC pattern already proven on the IT share.</li>
|
|
<li>Add a first GPO (desktop wallpaper or password policy) linked to <code>OU=Users,OU=ByteGeist</code>.</li>
|
|
<li>Enable the AD Recycle Bin and run user-delete / restore drills.</li>
|
|
<li>Build out <code>baseline</code> / <code>baseline-post-drills</code> snapshots on all three VMs for repeatable break/fix practice.</li>
|
|
</ul></article></main><footer class="metal-panel document-footer"><a href="../index.html#projects">CASKO.DEV / PROJECTS</a><span>KEITH CASKO / BYTEGEIST</span></footer></div><script src="../js/industrial.js" defer></script></body></html> |