Step-by-Step Guide to creating an Active Directory Lab using Windows Server in VirtualBox
Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. It is used to manage and organize users, computers, and other resources within a network. AD provides authentication, authorization, and centralized management through a hierarchical structure of domains, organizational units (OUs), and group policies. It enables IT administrators to control access, enforce security policies, and streamline network management. AD operates using protocols like LDAP (Lightweight Directory Access Protocol) and Kerberos for authentication.
1. Download Required Software:
Oracle VirtualBox: Download
Windows Server ISO: Download from Microsoft Evaluation Center
Windows 10/11 ISO (for a client machine)
2. Set Up VirtualBox and Install Windows Server
Step 1: Create a New Virtual Machine
1. Open VirtualBox and click New.
2. Enter Name (e.g., “AD Server”), Type: Microsoft Windows, and Version: Windows Server (64-bit).
3. Allocate at least 4GB RAM and 2 CPU cores.
4. Create a Virtual Hard Disk (Minimum 40GB, VDI, dynamically allocated).
Step 2: Install Windows Server
1. Select the VM and click Settings → Storage.
2. Click the Empty disk, then select the Windows Server ISO.
3. Start the VM and follow the installation steps:
- Choose Windows Server Standard with GUI.
- Set a strong administrator password.
3. Configure Windows Server for Active Directory
Step 3: Set a Static IP Address
1. Open Control Panel → Network and Sharing Center.
2. Click Change adapter settings → Right-click Ethernet → Properties.
3. Select Internet Protocol Version 4 (TCP/IPv4) → Properties.
4. Assign:
- IP Address: 192.168.1.10
- Subnet Mask: 255.255.255.0
- Default Gateway: 192.168.1.1
- Preferred DNS: 127.0.0.1
4. Install Active Directory Domain Services (AD DS)
Step 4: Add Active Directory Role
1. Open Server Manager → Click Manage → Add Roles and Features.
2. Select Role-based or Feature-based installation → Click Next.
3. Choose the server → Select Active Directory Domain Services (AD DS).
4. Click Next and install the role.
5. Promote Server to a Domain Controller
Step 5: Promote to Domain Controller
1. After installation, click Promote this server to a domain controller.
2. Select Add a new forest, enter a Domain Name (e.g., mydomain.local).
3. Choose Forest Functional Level: Windows Server 2016.
4. Set DSRM Password and complete the configuration.
5. The server will restart automatically.
6. Verify Active Directory Installation
1. Open Active Directory Users and Computers (ADUC).
2. Verify your domain (mydomain.local) exists.
3. Create a test user:
Right-click Users → New → User.
Set a Username & Password.
7. Add a Windows 10/11 Client to the Domain
Step 6: Set Up Windows Client VM
1. Create a new Virtual Machine for Windows 10/11.
2. Install Windows and set a static IP (192.168.1.20).
3. Open System Properties (sysdm.cpl).
4. Click Change Settings → Change.
5. Select Domain, enter mydomain.local, and provide Administrator credentials.
6. Restart the client PC.
8. Test Active Directory
1. Log in to the client using the domain user.
2. Open Command Prompt and run:
nslookup mydomain.local
Ensure it resolves correctly.
3. Verify GPO (Group Policy) and User Management in ADUC.
Conclusion
You now have a fully functional Active Directory Lab in VirtualBox! You can test user management, policies, and networking.