In this article we will install Active Directory Domain Controller for our AD Lab. We also have to enable and configure few services to make this DC ready for Cybersecurity lab.
- Part 1 – Overview and Network Configuration.
- Part 2 – Installing pfSense Firewall on Virtual Machine.
- Part 3 – Setup Kali Linux on Virtual Machine.
- Part 4 – Configuring the pfSense Firewall.
Table of contents
Install and Configure Windows Server 2019.
Download Windows Server ISO File.
You can either download Windows Server 2022 or Windows Server 2019 to install on a VM.
Download Windows Server 2022 ISO.
Navigate to Microsoft Evaluation Center and select the Windows Server 2022 version
![Windows Server 2022 Evaluation](https://aashu.co.in/wp-content/uploads/2024/05/Windows-Server-2022-1-1024x300.png)
After you click on Evaluate Now, another page will open up, select Download the ISO to download the Windows Server 2022 OS.
![Download Windows Server 2022 ISO File](https://aashu.co.in/wp-content/uploads/2024/05/Windows-Server-2022-Download-ISO-1-1024x363.png)
One the next page, Fill out the necessary information and select Download Now.
Download Windows Server 2019 ISO.
![Windows Server 2019](https://aashu.co.in/wp-content/uploads/2024/05/Windows-Server-2029-1024x223.png)
On the next page select Download the ISO, Fill out the necessary information and select Download Now.
Create VM for Windows Server.
Open the Hyper-V Manager and Click New > Virtual Machine from the Actions list.
![windows 2019 new VM](https://aashu.co.in/wp-content/uploads/2024/05/Windows-Server-2019-New-VM-1024x238.png)
In Specify Name and Location step, Enter a Name for the virtual machine as Windows Server 2019
Select another location on disk to store the VM data (Optional).
![Specify Name and Location](https://aashu.co.in/wp-content/uploads/2024/05/Specify-Name-and-Location.png)
In the Specify Generation step, Select the appropriate virtual machine generation: Generation 2.
![Specify Generation](https://aashu.co.in/wp-content/uploads/2024/05/Specify-Generation.png)
In the Assign Memory step, Please add enough RAM to meet the requirements of this environment. 4 GB RAM or more is better. Make sure you select “use dynamic memory for this virtual machine“.
![Assign Memory](https://aashu.co.in/wp-content/uploads/2024/05/Assign-Memory.png)
In the Configure Networking step, Select AD Lab from Connection drop-down menu.
![Configure Networking](https://aashu.co.in/wp-content/uploads/2024/05/Configure-Networking.png)
In the Connect Virtual Hard Disk step, Select Create a virtual hard disk and assign 40 to 60 GB for the VM disk.
![Connect Virtual Hard Disk](https://aashu.co.in/wp-content/uploads/2024/05/Connect-Virtual-Hard-Disk.png)
In the Installation Options step, Select Install an operating system from a bootable image file and Browse to the Windows Server 2019 installer ISO image.
![Installation Options](https://aashu.co.in/wp-content/uploads/2024/05/Installation-Options.png)
Click Finish if all of the information is correct.
Install Windows Server 2019 OS on VM.
Start the VM.
Select appropriate Language to install, Time and currency format and Keyboard or input method and then hit Next.
![Windows Setup](https://aashu.co.in/wp-content/uploads/2024/05/Windows-Setup-1024x843.png)
Click Install now.
I am selecting the Windows Server 2019 Datacenter Evaluation (Desktop Experience), You have an option to select Windows Server 2019 Standard Evaluation (Desktop Experience)
Refer the article for Comparison of Standard and Datacenter editions of Windows Server 2019
![Windows Server 2019 Datacenter Edition](https://aashu.co.in/wp-content/uploads/2024/05/Windows-Setup-2-1024x843.png)
Accept the Applicable Notice and License Terms.
Select Custom: Install Windows only (advanced)
![Custom Windows Install](https://aashu.co.in/wp-content/uploads/2024/05/Custom-Install-1024x843.png)
At the time of creating Drive, select new, type the size of the Drive you want to create and then select apply –> ok and hit next.
![Create Drive](https://aashu.co.in/wp-content/uploads/2024/05/Create-Drive-partition-1024x843.png)
Wait for the installation to complete and set the administrator account password and select Finish.
![Admin Account Password](https://aashu.co.in/wp-content/uploads/2024/05/Admin-password-1024x843.png)
Rename the Server.
Press the start menu –> Settings icon –> System –> About –> Rename this PC
![Rename this PC](https://aashu.co.in/wp-content/uploads/2024/05/Rename-this-PC.png)
Restart the Machine.
Configure the Network Interface.
As we are not using any DHCP service on the connecting port of pfSense, the Server will not get the IP address automatically, we have to manually set the IP address for the server.
Right click on the network interface icon –> select Open Network and Internet Settings
![network interface icon](https://aashu.co.in/wp-content/uploads/2024/05/network-interface.png)
Select Change Adapter Options
Right click on the Ethernet adapter and select properties.
![Ethernet Properties](https://aashu.co.in/wp-content/uploads/2024/05/ethernet-properties.png)
Double click on Internet protocol version 4 (TCP/IP v4)
![ipv4](https://aashu.co.in/wp-content/uploads/2024/05/ipv4.png)
Set the below IP address for the Ethernet adapter.
![ip address](https://aashu.co.in/wp-content/uploads/2024/05/ip-address.png)
Configure Active Directory Domain Services.
Press the start menu —> Server Manager –> Manage –> add roles and features.
![add roles and features](https://aashu.co.in/wp-content/uploads/2024/05/add-roles-and-features.png)
On the select installation type section, select the option Role-based or feature-based installation and hit next.
![](https://aashu.co.in/wp-content/uploads/2024/05/Select-installtion-type.png)
On the Server Selection section make sure that the option Select a server from the server pool is selected (The server name DC1 is automatically selected) and then hit next.
![server selection](https://aashu.co.in/wp-content/uploads/2024/05/server-selection.png)
On the Server Roles Section, select Active Directory Domain Services and DNS Server roles and hit next.
![Server Roles](https://aashu.co.in/wp-content/uploads/2024/05/Server-Roles.png)
Press next till you get the option to install the services and wait for the installation to finish.
Configure Active Directory Services.
Open the Server Manager and select the flag icon on the top right hand side and select promote this server to a domain controller.
![post deployment task](https://aashu.co.in/wp-content/uploads/2024/05/post-deployement-task-1024x382.png)
On the Deployment Configuration page, select add a new forest and set the root domain name as ad.lab
![Deployment Configuration](https://aashu.co.in/wp-content/uploads/2024/05/deployement-configuration.png)
On the Domain Controller Options page, use all the default options and set the Directory Services Restore Mode (DSRM) password.
![Domain Controller Options](https://aashu.co.in/wp-content/uploads/2024/05/domain-controller-options.png)
On the DNS Options page, don’t select anything and press next.
Press next and continue with default settings till the prerequisites check step and then select install.
![prerequisites check](https://aashu.co.in/wp-content/uploads/2024/05/prereqsites-check.png)
Wait for the installation to complete, you will be signed out and the server will automatically reboot.
![sign out](https://aashu.co.in/wp-content/uploads/2024/05/sign-out.png)
DNS Configuration.
Open the Server Manager –> and select Tools option from dashboard and then select DNS.
![DNS Configuration](https://aashu.co.in/wp-content/uploads/2024/05/DNS-Configuration-1024x317.png)
On the DNS Manager section, select DC1 and then double click on Forwarders.
![DNS Manager](https://aashu.co.in/wp-content/uploads/2024/05/DNS-Manager.png)
On the forwarders section, click on edit and set the ip address 10.0.3.1 as DNS Forwarder and hit OK.
![DNS Forwarders](https://aashu.co.in/wp-content/uploads/2024/05/edit-forwarders.png)
Active Directory Certificate Services Configuration.
Open the Server Manager and select Manage –> add roles and feature –> hit next till you get to the server role selection step.
On the Select Server Role step select the Active Directory Certificate Services and DHCP Server role and hit next.
![adcs](https://aashu.co.in/wp-content/uploads/2024/05/active-directory-certificate-services.png)
Select the defaults till the setup reaches the AD CS role services and select the Certification Authority role and hit next.
![Certification Authority](https://aashu.co.in/wp-content/uploads/2024/05/certification-authority.png)
Select the install option and wait for the services to install.
Once the services are installed, open the Server Manager –> select the flag icon on the top right hand side and select configure Active Directory Certificate Services option.
![Configure ADCS](https://aashu.co.in/wp-content/uploads/2024/05/configure-ADCS-1024x379.png)
On the credentials selection section, hit next.
![credentials](https://aashu.co.in/wp-content/uploads/2024/05/adcs-credentials.png)
In the Role Services section select Certification Authority
![roles service adcs](https://aashu.co.in/wp-content/uploads/2024/05/roles-and-services-adcs.png)
In the Setup Type select Enterprise CA
![enterprise CA](https://aashu.co.in/wp-content/uploads/2024/05/enterprise-CA.png)
In the CA Type select Root CA
![CA Type](https://aashu.co.in/wp-content/uploads/2024/05/CA-Type.png)
Click on Next till the setup reaches the Confirmation page, Click on Configure to save the changes
![adcs confirmation](https://aashu.co.in/wp-content/uploads/2024/05/adcs-confirmation.png)
Click on Close to exit the configuration of ADCS.
Creating Dummy Users in Active Directory.
Now we will create 2 users for testing in Active Directory.
Open Server Manager –> Tools –> Active Directory Users and Computers.
![ADUC](https://aashu.co.in/wp-content/uploads/2024/05/ADUC-1024x338.png)
Right click on the domain ad.local and select new and then select user.
![ADUC New User](https://aashu.co.in/wp-content/uploads/2024/05/ADUC-new-user.png)
We will create 2 users, User 1 is Test_User_One.
![](https://aashu.co.in/wp-content/uploads/2024/05/newuser1.png)
![](https://aashu.co.in/wp-content/uploads/2024/05/newuser2.png)
![](https://aashu.co.in/wp-content/uploads/2024/05/newuser3.png)
User 2 is Test_User_Two.
![](https://aashu.co.in/wp-content/uploads/2024/05/newuser4.png)
![](https://aashu.co.in/wp-content/uploads/2024/05/newuser5.png)
![](https://aashu.co.in/wp-content/uploads/2024/05/newuser6.png)
In the next article, we will install Windows 10 VM’s and setup DHCP server to assign the ip address to the Windows 10 VM automatically.