# Creating Domain Controller - DC03

## General machine info

* Machine Name: `DC03`
* IP Adress: `10.0.0.100`
* Subnetmask: `255.255.255.0`
* Gateway: `10.0.0.1`
* DNS: `10.0.0.100`
* Role: Domain Services
* Domain: `secure.local`

## Installation after sysprep

1. Startup the machine.
2. When asked if you copied the Virtual Machine, select "I Copied It".

![](https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FZhicPrcqAZ4C950gwo8E%2Fafbeelding.png?alt=media\&token=8dd18460-5c78-4d1e-b8a7-ca156f814792)

3\. Choose the correct settings for your lab, in our example we choose for the region "Netherlands", for app language we choose "English (United States)" and for keyboard layout "United States-International".

4\. Accept the 'License terms'.

5\. When asked to "Customize Settings" and set a password for the `Administrator` user, set the same password as before. Which was `Welcome01!`.

6\. Press CTRL + ALT + DEL and login with the user and password we just set.

## Renaming and setting a static IP

1. &#x20;Open File Explorer --> right click "This PC" --> Properties.

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2F2HeuNDDPWVB2Lvj4amiR%2Fafbeelding.png?alt=media&#x26;token=7f31a572-8ddd-423a-8de3-98ea434666c8" alt=""></div>

2\.  Click on "Rename this PC".

![](https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FcEbmdJNpl1jGRdbjsvRM%2Fafbeelding.png?alt=media\&token=3f99635f-f1d6-4bd8-af87-52b3dc6e9656)

3\. Fill in `DC03` and click "Next".

4\. When asked to restart, click on "Restart Now".

5\. Login again and rightclick in the Taskbar on the Networking Icon and select "Open Network & Internet Settings".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FwRSKpD36LeQbVY4QWUqk%2Fafbeelding.png?alt=media&#x26;token=1e41eb08-c3b9-4c70-b09f-7b5d8040c5e1" alt=""></div>

6\. Click on "Change adapter options".

![](https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FZVDybaWulyPm6Cq3IHza%2Fafbeelding.png?alt=media\&token=cb9a9a1f-22f0-4c0e-9a58-6dc0d8a51ddc)

7\. Right click the Ethernet adapter and select "Properties".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FwW2pGg39unMh8sScVmMK%2Fafbeelding.png?alt=media&#x26;token=2b87408f-f010-474f-80de-b5216c81fc17" alt=""></div>

8\. Select "Internet Protocol Version 4 (TCP/IPv4) and click "Properties".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2F4eqluxXbCllxSTYMJ6qk%2Fafbeelding.png?alt=media&#x26;token=88fd0cc5-0309-43ea-a2d1-3bc3a76bd808" alt=""></div>

9\. Copy the following settings:

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FNbFAsnglzul1uBaLSoZ7%2Fafbeelding.png?alt=media&#x26;token=15ea3854-3864-42b8-9f38-1be56e135223" alt=""></div>

10\. Click on "OK" and close all the Windows.

## Creating a new forest

### Installing Domain Services

1\. Click on start and open the "Server Manager".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FZTzPVwWxVj0gD3yq8s5p%2Fspaces-PqGbN7FCY7Xh4OkOtvin-uploads-git-blob-d24564630f70497fba35b7d1a7c867dca7be3db1-image.png?alt=media&#x26;token=eb166dc6-2b6f-47b5-a1dd-fff7ab1e99c8" alt=""></div>

2\. On the right top click on "Manage" and "Add Roles and Features".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FNp1QWDe4vssIbtCNMbCm%2Fspaces-PqGbN7FCY7Xh4OkOtvin-uploads-git-blob-8b4c50fab8563bed5db78c47f290d256b40e6f66-afbeelding%20(81).png?alt=media&#x26;token=f34e151f-c239-4ef2-b79d-0ec506d50923" alt=""></div>

3\. Check the "Skip this page by default" box and click "Next" three times (For the steps "Before You Begin", "Installation Type" and "Server Selection".

4\. At the step "Server Roles" select "Active Directory Domain Services".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fg8XYjoPX3skKZVGbUS0J%2Fspaces-PqGbN7FCY7Xh4OkOtvin-uploads-git-blob-031a92373fc86b3497aaedf7a2a0c84f5f32b0cf-afbeelding.png?alt=media&#x26;token=5ca1b4d6-ab19-4a38-b6bb-e66e5720c522" alt=""></div>

5\. After we have selected "Active Directory Domain Services" a new window will pop-up. Within this window we click on "Add Features".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fn1WZhy0LiTn8Ky2N5SET%2Fspaces-PqGbN7FCY7Xh4OkOtvin-uploads-git-blob-135915c3c2bd3334789e52e3c4f29e78fbc8c195-afbeelding.png?alt=media&#x26;token=00ea6526-fd05-4759-b757-6707d15512ef" alt=""></div>

6\. After "Active Directory Domain Services" is selected we click on "Next". We also click "Next" at the "Features" and "AD DS" steps.

7\. At the "Confirmation" step click "Install". This can take some minutes.

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FJJNoqteXSFCjVazxorzJ%2Fspaces-PqGbN7FCY7Xh4OkOtvin-uploads-git-blob-7fcaf057403592aed790535c2f27f12930cbf2f6-afbeelding.png?alt=media&#x26;token=d1d91bbc-ce43-4e80-8257-72b8b3d7857e" alt=""></div>

8\. When the installation finishes close the window.

### Promoting to Domain Controller

1\. In the server manager click on the flag and click on "Promote this server to a domain controller"

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FFjIXg4k7UCQ0JML80pML%2Fimage.png?alt=media&#x26;token=c1ae5f54-b55e-4661-8561-9faab5c8cd4b" alt=""></div>

2\. Select "Add a new forest" and fill in the domain name `secure.local`.

3\. At the step "Domain Controller Options" set a DSRM Password. For this domain we will choose `SecureRecoveryKey2022` as password.

![](https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2F6fMd45qMENEmNxSVCR7I%2Fimage.png?alt=media\&token=153d98b5-1585-4c60-9c18-b82081355393)

4\. For the steps "DNS Options", "Additional Options", "Paths" and "Review Options" click Next.

5\. At the step "Prerequisites Check" click "Install".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2F88qbXMi2aMszcXYL3Nm6%2Fimage.png?alt=media&#x26;token=e8e3753f-804e-4125-8eb1-b782c17ad53e" alt=""></div>

6\. The machine should automatically restart, if not manually restart the machine.

7\. Login with the `Administrator:Welcome01!` credentials.

### Creating DNS records

1. Login to `DC001` as the `Administrator` user with password `Welcome01!`.
2. Open the "Server Manager", click on "Tools" and open the "DNS" tool.

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fp7xM9rKqSBxplJxOi0hr%2Fimage.png?alt=media&#x26;token=237bb60a-5ba1-4836-8f87-650091e02076" alt=""></div>

3\. In the DNS Server expand "DC01" and right click on "Conditional Forwarders" and click "new".

4\. Add the DNS Domain `secure.local` with the IP `10.0.0.100` and click "OK".&#x20;

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FEAz82yJdNh03BDc9JH04%2Fimage.png?alt=media&#x26;token=e154c73c-7dcc-4803-bd1e-d669b3149fa0" alt=""></div>

{% hint style="info" %}
If you see a cross don't worry. I takes some time to validate. You can check the properties later to check if it is validated.
{% endhint %}

5\. Do the same on `DC03` but then for `bank.local` with the IP `10.0.0.2`.

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FXaDXIIS5CPWCZPPRinLI%2Fimage.png?alt=media&#x26;token=473999ba-22b4-46d7-8459-2209cadd6ace" alt=""></div>

### Creating trust to bank.local

1. Open the "Server Manager", click on "Tools" and then "Active Directory Domain and Trusts".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FgqWaDwGA2FwuoZ3XQwxO%2Fimage.png?alt=media&#x26;token=afa0113a-b8a6-44b7-9971-63e40a32a220" alt=""></div>

2\. Right click the domain object "Secure.local" and click on "Properties".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FNglblWa8FrjhDnKo2418%2Fimage.png?alt=media&#x26;token=c3e70aef-a4b7-4ccd-8077-a8eba6d66642" alt=""></div>

3\. Click on the tab "Trust", then click "New Trust" and then click "Next".

4\. On the "Trust Name" page, type the NetBIOS name `bank.local` and then click "Next".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2Fydi2O6f3F4XRncVUYBOd%2Fimage.png?alt=media&#x26;token=8402acf4-f19f-4bfd-8b66-29ceb9b4dc04" alt=""></div>

5\. On the "Trust Type" page, select "External trust" and click "Next".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FxCMH6PVdB6GDUQDtpzPA%2Fimage.png?alt=media&#x26;token=22d729f4-cee1-4c0e-80f0-b056d6cafb61" alt=""></div>

6\. On the "Direction of trust" page select "Two-Way" and click "Next".

7\. On the "Sides of Trust" page select "Both this domain and the specified Domain" and click "Next".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FQ09rHaQ81V3rD5D4ADSE%2Fimage.png?alt=media&#x26;token=3b57c984-e345-49d2-8caf-565e5b4a381c" alt=""></div>

8\. Fill in the the credentials Administrator and password Welcome01.

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FZfJshhal55Aql9xCQxlV%2Fimage.png?alt=media&#x26;token=2a56e0dc-efa6-46ff-a845-b8d11a94d906" alt=""></div>

9\. Select "Domain-wide authentication" for this trust and click "Next".&#x20;

10\. Select "Domain-wide authentication" for this trust and click "Next" till the page "Confirm Outgoing Trust".

11\. On the page "Confirm Outgoing Trust" select "Yes, confirm the outgoing trust".

12\. On the page "Confirm incoming Trust" select "Yes, confirm the incoming trust".

13\. Click "Finish"

14\. Close the Windows.

### Enable RDP

1. Open the Server Manager and click in the left menu on "Local Server".
2. Click on "Disabled" in the "Remote Desktop" section

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FjikkRc64kPlytTfbZ0n1%2Fimage.png?alt=media&#x26;token=7bfa65d9-1c75-41e1-a3af-62d2519dab70" alt=""></div>

3\. Then select "Allow remote connections to this computer" in the "Remote Desktop" section and click "Apply" and "Ok".

<div align="left"><img src="https://1033393870-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FPqGbN7FCY7Xh4OkOtvin%2Fuploads%2FVjlxmq7BlswJy5LH2UxE%2Fimage.png?alt=media&#x26;token=622665a5-6ff9-45a6-98c4-de810b027ca6" alt=""></div>

Remote Desktop is enabled.
