# Home Lab: Part 6

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/building-home-lab-part-6-banner.png" alt=""><figcaption></figcaption></figure>

For the Active Directory (AD) Lab we are going to configure three VMs. The first VM will be the Domain Controller (DC) of the environment. We will use Windows Server 2019 for this machine. The other two VMs will be the clients that use this environment. For the client VMs, we will use Windows 10 Enterprise.

Microsoft provided Evaluation copies for both of them. Windows Server 2019 has a license of 180 days while Windows 10 Enterprise has a license of 90 days. They should function just fine even after the evaluation period expires. After setting up the lab we will create snapshots for the VMs. The snapshots can also be used to roll back to the start of the evaluation period once it expires.

> We can create an Active Directory Lab using a single client as well but there are certain AD attacks that require two clients to perform. Depending on your use case you may skip the setup of the second 2nd client.

### Downloading Windows ISO Files <a href="#downloading-windows-iso-files" id="downloading-windows-iso-files"></a>

#### Windows Server 2019 <a href="#windows-server-2019" id="windows-server-2019"></a>

Go to the following URL: [Windows Server 2019 | Microsoft Evaluation Center](https://www.microsoft.com/en-us/evalcenter/download-windows-server-2019)

Click on the **`64-bit edition`** download. The ISO file is \~5GB.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/win-download-1.png" alt=""><figcaption></figcaption></figure>

#### Windows 10 Enterprise <a href="#windows-10-enterprise" id="windows-10-enterprise"></a>

Go to the following URL: [Windows 10 Enterprise | Microsoft Evaluation Center](https://www.microsoft.com/en-us/evalcenter/download-windows-10-enterprise)

Click on the **`64-bit edition`** Enterprise ISO download option. The ISO file is \~5GB.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/win-download-2.png" alt=""><figcaption></figcaption></figure>

#### ISO File Names <a href="#iso-file-names" id="iso-file-names"></a>

Pay attention to the names of the downloaded files. Microsoft uses the OS build number as the filename. You can rename the files to avoid confusion.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/win-download-3.png" alt=""><figcaption></figcaption></figure>

| ISO Name                                                                                   | OS Name                 |
| ------------------------------------------------------------------------------------------ | ----------------------- |
| `17763.3650.221105-1748.rs5_release_svc_refresh_SERVER_EVAL_x64FRE_en-us`                  | `Windows Server 2019`   |
| `19045.2006.220908-0225.22h2_release_svc_refresh_CLIENTENTERPRISEEVAL_OEMRET_x64FRE_en-us` | `Windows 10 Enterprise` |

> The build number maybe different when you download the images. These are the latest versions that are available as for writing of this module (Dec, 2023).

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/win-download-4.png" alt=""><figcaption></figcaption></figure>

### Creating the VMs <a href="#creating-the-vms" id="creating-the-vms"></a>

#### Windows Server 2019 <a href="#windows-server-2019-1" id="windows-server-2019-1"></a>

Click on Tools from the VirtualBox sidebar and select **`New`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-1.png" alt=""><figcaption></figcaption></figure>

Gave the VM a name. Ensure that the Folder option points to the location where all the Home Lab-related VMs are saved. For the ISO Image select the downloaded Windows Server 2019 image. Select the **`Skip Unattended Installation`** option and then click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-2.png" alt=""><figcaption></figcaption></figure>

Increase the Memory to **`4096MB`** (4GB) and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-3.png" alt=""><figcaption></figcaption></figure>

Increase the Hard Drive size to **`100GB`** and then click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-4.png" alt=""><figcaption></figcaption></figure>

Confirm that all the values look correct and then click on **`Finish`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-5.png" alt=""><figcaption></figcaption></figure>

**Adding VM to Group**

Right-click on the Windows Server 2019 VM and choose **`Move to Group -> [New]`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-6.png" alt=""><figcaption></figcaption></figure>

Right-click on the group name and select **`Rename Group`**. Name the group **`Active Directory`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-7.png" alt=""><figcaption></figcaption></figure>

Right-click on the group name (Active Directory) and choose **`Move to Group -> Home Lab`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-8.png" alt=""><figcaption></figcaption></figure>

The final output should look as follows:

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-9.png" alt=""><figcaption></figcaption></figure>

#### Windows 10 Enterprise VM1 <a href="#windows-10-enterprise-vm1" id="windows-10-enterprise-vm1"></a>

From the VirtualBox sidebar select Tools and then click on **`New`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-10.png" alt=""><figcaption></figcaption></figure>

Give the VM a name. Ensure that the Folder option is pointing to the location where all the Home Lab VMs are saved. For the ISO Image option select the Windows 10 Enterprise image. Tick the **`Skip Unattended Installation`** option. Click on **`Next`** to continue.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-11.png" alt=""><figcaption></figcaption></figure>

Leave Memory and CPU on its default value. Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-12.png" alt=""><figcaption></figcaption></figure>

Increase the Hard Disk size to **`100GB`** and then click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-13.png" alt=""><figcaption></figcaption></figure>

Verify that all the options are correct and then click on **`Finish`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-14.png" alt=""><figcaption></figcaption></figure>

**Adding VM to Group**

Right-click on the VM and then choose **`Move to Group -> Home Lab/Active Directory`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-15.png" alt=""><figcaption></figcaption></figure>

The final result should match the following:

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-16.png" alt=""><figcaption></figcaption></figure>

#### Windows 10 Enterprise VM2 <a href="#windows-10-enterprise-vm2" id="windows-10-enterprise-vm2"></a>

Follow the same steps as above to create the VM for the second AD user.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-22.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-23.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-12.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-13.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-24.png" alt=""><figcaption></figcaption></figure>

**Adding VM to Group**

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-25.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-30.png" alt=""><figcaption></figcaption></figure>

### Configuring the VMs <a href="#configuring-the-vms" id="configuring-the-vms"></a>

#### Windows Server 2019 <a href="#windows-server-2019-2" id="windows-server-2019-2"></a>

Select the Windows Server 2019 VM and click on **`Settings`** from the toolbar.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-17.png" alt=""><figcaption></figcaption></figure>

Go to **`System -> Motherboard`**. For Boot Order ensure **`Hard Disk`** is not the top followed by **`Optical`**. Disable **`Floppy`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-18.png" alt=""><figcaption></figcaption></figure>

Go to **`Network -> Adapter 1`**. For the Attacked to field select **`Internal Network`**. For name select **`LAN 2`**. Click on **`OK`** to save the settings.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-19.png" alt=""><figcaption></figcaption></figure>

#### Windows 10 Enterprise VM1 <a href="#windows-10-enterprise-vm1-1" id="windows-10-enterprise-vm1-1"></a>

Select Windows 10 Enterprise VM1 from the sidebar and then from the toolbar choose **`Settings`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-20.png" alt=""><figcaption></figcaption></figure>

Go to **`System -> Motherboard`**. For Boot Order ensure **`Hard Disk`** is on the top followed by **`Optical`**. Disable **`Floppy`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-21.png" alt=""><figcaption></figcaption></figure>

Go to **`Network -> Adapter 1`**. For the Attacked to field select **`Internal Network`**. For name select **`LAN 2`**. Click on **`OK`** to save the settings.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-26.png" alt=""><figcaption></figcaption></figure>

#### Windows 10 Enterprise VM2 <a href="#windows-10-enterprise-vm2-1" id="windows-10-enterprise-vm2-1"></a>

Follow the same steps as above to change the settings for the AD User 2 VM.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-27.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-28.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/windows-29.png" alt=""><figcaption></figcaption></figure>

### Windows Server 2019 Setup <a href="#windows-server-2019-setup" id="windows-server-2019-setup"></a>

#### OS Installation <a href="#os-installation" id="os-installation"></a>

Select Windows Server 2019 from the sidebar and click on **`Start`** from the toolbar.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-1.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-2.png" alt=""><figcaption></figcaption></figure>

Click on **`Install now`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-3.png" alt=""><figcaption></figcaption></figure>

Select **`Windows Server 2019 Standalone Evaluation (Desktop Experience)`** and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-4.png" alt=""><figcaption></figcaption></figure>

Accept the agreement and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-5.png" alt=""><figcaption></figcaption></figure>

Select **`Custom: Install Windows only (Advanced)`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-6.png" alt=""><figcaption></figcaption></figure>

Select **`Disk 0`** and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-7.png" alt=""><figcaption></figcaption></figure>

The VM will restart a couple of times during the installation process.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-8.png" alt=""><figcaption></figcaption></figure>

#### OS Setup & Configuration <a href="#os-setup--configuration" id="os-setup--configuration"></a>

Once the installation is complete we will be asked to set the password for the Administrator account. Once set click on **`Finish`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-9.png" alt=""><figcaption></figcaption></figure>

We won’t be able to log in by using the **`Ctrl+Alt+Delete`** shortcut. This will open the system settings menu of the host system.

VirtualBox has a shortcut configured to perform this action. Use the shortcut **`Right Ctrl+Delete`** to access the login screen. Enter the configured password to access the VM.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-10.png" alt=""><figcaption></figcaption></figure>

To view the configured shortcuts from the main VirtualBox window click on **`File -> Preferences`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-103.png" alt=""><figcaption></figcaption></figure>

Select **`Input -> Virtual Machine`**. If we scroll down we should see that **`Ctrl+Alt+Delete`** has been mapped to **`Host+Delete`**. The default mapping for the host key is **`Right Ctrl`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-100.png" alt=""><figcaption></figcaption></figure>

Once we log in. Server Manager will automatically open. A popup will also open asking us to try Windows Admin Center. Click on Don't show this message again and then click on **`X`** to close the popup.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-11.png" alt=""><figcaption></figcaption></figure>

**Guest Additions Installation**

To make the VM screen size bigger we need to install Guest Additions. From the VM toolbar click on **`Devices -> Optical Devices -> Remove disk from virtual drive`**. This will remove the Windows Server 2019 image from the disk drive.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-12.png" alt=""><figcaption></figcaption></figure>

Then select **`Devices -> Insert Guest Additions CD image`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-13.png" alt=""><figcaption></figcaption></figure>

From the taskbar open **`File Explorer`**. Once the disk is loaded it will show up in the sidebar. Click on it to view its content. Double-click on **`VBoxWindowsAdditions`** (4th file from bottom) to start the installer.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-14.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-15.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-16.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`** again to install the requirement components.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-17.png" alt=""><figcaption></figcaption></figure>

Choose **`Reboot now`** and click on **`Finish`**. The VM will restart automatically.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-18.png" alt=""><figcaption></figcaption></figure>

After restart, log into the system. From the VM toolbar click on **`Devices -> Optical Drivers -> Remove disk from virtual drive`** to remove the Guest Additions image.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-93.png" alt=""><figcaption></figcaption></figure>

Use the shortcut **`Right Ctrl+F`** to enter Fullscreen mode. The VM will automatically scale to fill the entire screen. Use the same shortcut to exit Fullscreen mode.

**Network Configuration**

During the pfSense setup module (Part 2) we disabled DHCP on the **`AD_LAB`** interface because of this our VM will not be automatically assigned an IP address. From the taskbar right-click on the network icon and select **`Open Network & Internet settings`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-19.png" alt=""><figcaption></figcaption></figure>

Click on “Change adapter options”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-20.png" alt=""><figcaption></figcaption></figure>

On the Network Connections page, we should see the Ethernet adapter. Right-click on the adapter and select **`Properties`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-21.png" alt=""><figcaption></figcaption></figure>

Select **`Internet Protocol Version 4 (TCP/IPv4)`** and click on **`Properties`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-22.png" alt=""><figcaption></figcaption></figure>

Enter the details as shown below and then click on **`OK`**. Click on **`OK`** again to close the Ethernet Properties menu.

IP address: **`10.80.80.2`**\
Subnet mask: **`255.255.255.0`**\
Default gateway: **`10.80.80.1`**\
Preferred DNS Server: **`10.80.80.2`**

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-23.png" alt=""><figcaption></figcaption></figure>

Windows will display a banner to allow internet access click on **`Yes`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-24.png" alt=""><figcaption></figcaption></figure>

Close the Network Connections page.

In the Settings app click on the **`Home`** button (above search bar).

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-20.png" alt=""><figcaption></figcaption></figure>

**Renaming the System**

Before we can set up the machine to be a Domain Controller let us rename the PC. Select “System”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-25.png" alt=""><figcaption></figcaption></figure>

Click on About on the sidebar and then click on the “Rename this PC” button. Give the PC an easy-to-remember name and then click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-26.png" alt=""><figcaption></figcaption></figure>

Click on “Restart now” for the changes to take effect.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-27.png" alt=""><figcaption></figcaption></figure>

**Active Directory & DNS Installation**

After login wait for Server Manager to load. Click on the **`Manage`** button from the top right corner and select “Add Roles and Features”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-28.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`** till you reach the Server Roles page.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-29.png" alt=""><figcaption></figcaption></figure>

On this page enable “Active Directory Domain Services” and “DNS Server”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-30.png" alt=""><figcaption></figcaption></figure>

When you enable a feature the “Add Roles and Features Wizard” will open click on “Add Features” to confirm the selection.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-31.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-32.png" alt=""><figcaption></figcaption></figure>

Once both the features are selected click on **`Next`** to proceed with installation.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-33.png" alt=""><figcaption></figcaption></figure>

Click **`Next`** till you reach the Confirmation page. Here click on **`Install`** to start the installation of the selected features.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-34.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-35.png" alt=""><figcaption></figcaption></figure>

Once the installation is complete click on **`Close`** to exit the Wizard.

**Active Directory Configuration**

Click on the Flag icon present in the top right of the toolbar in Server Manager. From the dropdown click on “Promote this server to a domain controller”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-36.png" alt=""><figcaption></figcaption></figure>

The AD Domain Servers Configuration Wizard will open. For deployment operation select **`Add a new Forest`**. Give the domain a name. For my setup, I will be using the domain name **`ad.lab`**. After selecting the name click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-37.png" alt=""><figcaption></figcaption></figure>

> The name assigned to the domain has to be made of two words that are separated by a period.

On this page enter a password to use for using the AD Restore feature.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-38.png" alt=""><figcaption></figcaption></figure>

Ignore the warning that is shown and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-39.png" alt=""><figcaption></figcaption></figure>

The NetBIOS name should automatically be filled. It will be the first part of the domain name. Click on **`Next`** to continue.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-40.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-41.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-42.png" alt=""><figcaption></figcaption></figure>

Click on **`Install`** to start the Domain Services setup process.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-43.png" alt=""><figcaption></figcaption></figure>

Once the install process is complete the machine will need to restart. Click on **`Close`** to reboot the system.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-44.png" alt=""><figcaption></figcaption></figure>

On restart, you will notice that the name that is shown on the login page has changed. The first part of the domain name is prepended to the username. This means the machine has successfully been configured as the domain controller. Log in using the Administrator password.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-45.png" alt=""><figcaption></figcaption></figure>

**DNS Configuration**

Since we enabled DNS on this machine (Domain Controller). This machine (DC) will act as the DNS server for devices that are connected to the **`ad.lab`** environment. For the DNS service to function properly we need to configure a Forwarder. Forwarder is the device to which the DNS queries will be sent when the DC cannot resolve it. In our case, we need to forward the request to pfSense. The DNS service of pfSense will then perform the lookup.

Open the Start menu expand the “Windows Administrative Tools” folder and select **`DNS`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-94.png" alt=""><figcaption></figcaption></figure>

In the sidebar select the Domain Controller (in my case DC1) and from the right menu double-click on “Forwarders”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-95.png" alt=""><figcaption></figcaption></figure>

Go to **`Forwarders -> Edit`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-96.png" alt=""><figcaption></figcaption></figure>

This will open the Forwarder configuration page. Enter the IP address of the **`AD_LAB`** interface (**`10.80.80.1`**) and press **`Enter`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-97.png" alt=""><figcaption></figcaption></figure>

Once added. Click on **`OK`** to confirm the change.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-98.png" alt=""><figcaption></figcaption></figure>

Click on **`Apply`** then **`OK`** to save the changes.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-99.png" alt=""><figcaption></figcaption></figure>

**DHCP Installation**

Since DHCP is disabled on the **`AD_LAB`** interface when new devices are added they will not be assigned an IP address. We will enable the DHCP service on the DC. Once set devices that connect to the **`AD_LAB`** network will be automatically assigned an IP address by the Domain Controller DHCP server.

Click on Manage from the toolbar in Server Manager. Then choose “Add Roles and Features”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-46.png" alt=""><figcaption></figcaption></figure>

Keep clicking **`Next`** till you reach the “Server Roles” page. Enable “DHCP Server” then click on “Add Features”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-47.png" alt=""><figcaption></figcaption></figure>

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-48.png" alt=""><figcaption></figcaption></figure>

Keep clicking **`Next`** till you reach the Confirmation page. Click **`Install`** to enable DHCP.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-49.png" alt=""><figcaption></figcaption></figure>

**DHCP Configuration**

After the installation is complete click on the Flag present in the toolbar of Server Manager and click on “Complete DHCP configuration”.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-61.png" alt=""><figcaption></figcaption></figure>

Click on **`Commit`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-62.png" alt=""><figcaption></figcaption></figure>

Click on **`Close`** to complete the installation.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-63.png" alt=""><figcaption></figcaption></figure>

From the Start menu click on “Windows Administrative Tools” and then choose **`DHCP`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-50.png" alt=""><figcaption></figcaption></figure>

Expand the DHCP server (in my case **`dc1.ad.lab`**) dropdown on the left side of the window.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-101.png" alt=""><figcaption></figcaption></figure>

Right-click on **`IPv4`**. Then select “New Scope”. The scope defines the range of IP addresses that can be assigned to devices by the DHCP server.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-51.png" alt=""><figcaption></figcaption></figure>

Enter a Name and Description for the new scope.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-52.png" alt=""><figcaption></figcaption></figure>

Enter the details as shown below.

Start IP address: **`10.80.80.11`**\
End IP address: **`10.80.80.253`**\
Length: **`24`**\
Subnet mask: **`255.255.255.0`**

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-53.png" alt=""><figcaption></figcaption></figure>

> You can chose the Start IP address to be **`10.80.80.3`**. I have purposely left the starting IP addresses out of the DHCP scope. In the future if the need arises I can use these IPs for static IP assignment.

We don’t have any Exclusions (static IP assignment). Leave all the options empty and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-54.png" alt=""><figcaption></figcaption></figure>

Increase the lease time to **`365`** days and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-55.png" alt=""><figcaption></figcaption></figure>

> Since we increased the lease duration when a IP address is assigned to a device the device will be allowed to use that IP address without requesting a new IP address for 365 days.

Select “Yes, I want to configure these options now” and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-56.png" alt=""><figcaption></figcaption></figure>

In the IP address field enter the default gateway for the **`AD_LAB`** interface (**`10.80.80.1`**) and then click on **`Add`**. Once added click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-57.png" alt=""><figcaption></figcaption></figure>

Click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-58.png" alt=""><figcaption></figcaption></figure>

We are not configuring a WINS Server for our environment so click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-59.png" alt=""><figcaption></figcaption></figure>

Select “Yes, I want to activate this scope now” and click on **`Next`**.

<figure><img src="https://blog.davidvarghese.net/assets/images/building-home-lab-part-6/dc-60.png" alt=""><figcaption></figcaption></figure>

So far we have installed Windows Server 2019, installed Guest Additions, configured the VM to be the Domain Controller (DC), set up a DNS Forwarder and configured DHCP. We still need to create users in the DC and set up client machines to use the AD environment. We will cover these topics in part 2 of this module.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://foothold.gitbook.io/blog/home-lab-part-6.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
