Setting up
Description
In this tutorial, the Active Directory home lab is set up with Oracle Virtual Box. The installation of Microsoft Server 2019 as a domain controller and Windows 10 Pro as a client on virtual machines is done. Additionally, the NAT and DHCP are configured to enable the client to connect to the domain. By following this tutorial, you will have the opportunity to learn how to set up an Active Directory home lab, which can be a valuable learning experience.
Software Used
Network Map
Walk-through:
Step 1: Install the Oracle Virtual Box
Step 2: Create Windows server 2019 virtual machine
Step 3: Create Windows 10 virtual machine
Step 4: Setup server network adapters
To set up an IP address for your internal network, first click on "Network & Internet" located in the bottom right corner of your computer screen.
From there, select "Change adapter options" on the right side of the window.
This will open up a list of network connections. Right-click on the appropriate network connection and select "Properties." Next, scroll down and select "Internet Protocol Version 4 (TCP/IPv4)" and click on the "Properties" button.
From there, you can choose to either obtain an IP address automatically or specify an IP address manually by selecting the "Use the following IP address" option. In our case add IP manually as show in the picture below.
Once you've entered the necessary information, click "OK" to save your changes and your internal network will be configured.
Step 5: Install Active Directory Domain Services
Adding Active Directory Domain Services (AD DS) to a Windows server is a crucial step in creating and managing a network of computers.
To get started, open Server Manager and select "Add roles and features" from the "Manage" menu. This will launch the Add Roles and Features Wizard.
Click "Next" to proceed, and then select "Role-based or feature-based installation" and click "Next" again.
Next, you'll need to select the server on which you want to install AD DS. Once you've selected the appropriate server, scroll down and check the box next to "Active Directory Domain Services."
This will bring up a prompt asking you to add any additional features required by AD DS. Review the features that will be installed, and then click "Install" to begin the installation process.
Once the installation is complete, you'll need to configure AD DS by running the Active Directory Domain Services Configuration Wizard. To create a new forest, click on the yellow exclamation mark at the upper right corner of the console and select "Add a new forest."
Follow the prompts to name your domain (in this case, "hackyourlife.com"), set up a password, and configure the other necessary settings.
Once you've completed the configuration, click "Install" to finish the process.
Note that you will be logged out of the server during the installation, but you can log back in once the process is complete.
Step 6: Create admin domain account
To create an admin domain account in Active Directory, first log back into your Windows server.
From the Start menu, open Windows Administrative Tools and select Active Directory Users and Computers.
Right-click on your domain and select "New" followed by "Organisational Unit."
Name the new OU "_ADMINS" and click "OK."
Right-click on the new OU and select "New" followed by "User."
Name your admin user and set a password (you can also uncheck "User must change password at next logon" for convenience and check "Password never expires" if you don't want to deal with password expiration at this time).
Right-click on your newly created admin user and select "Properties."
Go to the "Member Of" tab and click "Add."
Name the new group "Domain Admins" and click "OK" and then "Apply."
You can now log out and log back in using your new admin account.
Step 7: Install and configure RAS/NAT:
To install and configure RAS/NAT (Routing and Remote Access and Network Address Translation), first open Server Manager and click on "Add roles and features."
Click "Next" and select "Remote Access."
Click "Next" again and check the box next to "Routing."
Click "Next" and then "Install."
Once the installation is complete, go to the "Tools" menu and select "Routing and Remote Access."
Right-click on your domain and select "Configure and Enable Routing and Remote Access."
Click "Next" and select "Network Address Translation (NAT)."
Click "Next" again and choose the option to "Use this public interface to connect to the Internet."
Select your Internet connection from the list and click "Next" and then "Finish."
Your RAS/NAT should now be configured and ready to use.
Step 8: Install and configure DHCP:
To install and configure DHCP on your server, you need to first add the DHCP role and features.
To get started, open Server Manager and select "Add roles and features" from the "Manage" menu. This will launch the Add Roles and Features Wizard.
Click "Next" to proceed, and then select "Role-based or feature-based installation" and click "Next" again.
Next, you'll need to select the server on which you want to install AD DS. Once you've selected the appropriate server, scroll down and check the box next to "DHCP Server"
This will bring up a prompt asking you to add any additional features required by AD DS. Review the features that will be installed, and then click "Install" to begin the installation process.
Once added, open the DHCP tool from the Server Manager's Tools menu.
Right-click on your domain, select "New Scope" and follow the instructions to name the scope and set up the address range, in our case, you can name the scope '172.16.0.100-200' and the address range will be from 172.16.0.100 to 172.16.0.200. Then, set up the lease duration and complete the wizard.
Afterward, right-click on your domain and click "Authorize" and refresh the page to ensure it's added.
Now your DHCP server is set up and ready to assign IP addresses to the devices on your network.
Step 9: Join your client to domain and login with domain credentials:
To join your client to the domain, first, navigate to your client VM.
Then, right-click on the Windows icon, select System, and choose Rename your PC (advanced).
Next, click on Change and type your domain name.
Sign in with one of the domain user's credentials, and you're all set.
Your client machine is now a part of the domain, and you can manage it using your domain admin account.
Your network interface on your client should look like this.
Congratulations! Your work is done for now :)