In this article, we will show you how to replicate Active Directory on Windows Server 2012, 2016 or 2019. Active Directory lets us centrally manage users, servers, printers, … there is no need to discuss the advantages of centralizing everything; if we have several interconnected servers, any change is much easier with Active Directory, hereafter AD. In this article, we will explain how to replicate AD on a secondary server. You can consult these other articles: how to configure AD and add a server to AD. For these 3 articles, we will use servers with these IPs:
- KB-AD-01 => 172.16.0.1
- KB-AD-02 => 172.16.0.2
- KB-SRV-01 => 172.16.0.11
- KB-SRV-02 => 172.16.0.12
Prepare the network configuration
The first thing we will do is configure our server's network adapters. Basically, we will configure the DNS servers to use those configured by AD internally. We will also configure DNS records to be created only with the servers' internal IPs, avoiding problems with the firewalls in the client panel. Keep in mind that the same record can be created with both the public and private IP, and when you access it through the DNS record, it may sometimes use the public IP and sometimes the private IP -depending on the firewall configuration, this may fail-.
- Public IP network adapter:
- Disable TCP/IPv6.
- Configure DNS servers 172.16.0.1 and 172.16.0.2.
- Opciones avanzadas > DNS, disable the option to create a DNS record.
- Opciones avanzadas > WINS, disable NetBIOS over TCP/IP.
- Private network adapter:
- Disable TCP/IPv6.
- Set the IP to 172.16.0.2 and the network mask to 255.255.255.0.
- Configure DNS servers 172.16.0.1 and 172.16.0.2.
Here are screenshots of the entire process:
Add roles
Now that the network adapters are configured, we can proceed to install AD. In our case, we will add a DNS server, but this is optional. To add AD, we will go to administrador del servidor and añadir roles, follow the wizard and, under Server Roles, select the checkboxes for Active Directory Domain Services and DNS Server and follow all the steps until the AD installation finishes -do not close the installer-. Here are screenshots of the process:
Configure Active Directory
When the AD installation finishes, we will have a link to configure AD. To do this, click Promote this server to a domain controller. The AD wizard will open, and for the configuration type we will choose Add a domain controller to an existing domain, click “Select” and enter the login credentials for our kb-ad-01 server. This will allow us to select the existing domain. In the next step, we will enter our password for recovering AD in case of failure and follow the wizard with the default options. Here are screenshots of the process:
Configure DNS forwarders
When the domain promotion finishes, the server will restart automatically. We must now log in with the user “kb-test\administrator”. Finally, we will configure “DNS Forwarders”, which allows us to correctly resolve DNS records outside our domain. To do this, we will open the DNS manager, right-click the server name and choose Propiedades, then in the window that opens, click the Forwarders tab. We will remove the server “172.16.0.1”, add the DNS servers we want to use and accept the changes. Here are screenshots of the process: