How to Set Up a Windows Domain on a VPS and Join a Workstation to the Domain

 To create a Windows Domain with a VPS server and join a workstation (with an IP range of 192.168.100.xxx) to the domain, follow these steps:

1. Set up the VPS as a Domain Controller (DC)

  • Install Windows Server on your VPS.
  • Set a static IP address for the VPS (e.g., 192.168.100.1).

Install Active Directory Domain Services (AD DS):

  • Open Server Manager > Manage > Add Roles and Features.

  • In the wizard, choose Active Directory Domain Services.

  • After installation, promote the server to a domain controller by running the following PowerShell command:

    powershell
    Install-ADDSForest -DomainName "yourdomain.local"
  • This will create a new domain (e.g., yourdomain.local), and the server will act as the domain controller.

  • Set up a DNS server during the AD setup, as it's needed for domain resolution.

2. Configure DNS on the VPS

  • Ensure that the DNS service is installed and running on the VPS.
  • Make sure the VPS DNS IP points to itself (e.g., 192.168.100.1).

3. Configure the Workstation

  • Set a static IP address for your workstation (e.g., 192.168.100.10).
  • Set the DNS server of the workstation to the IP address of the VPS (e.g., 192.168.100.1).

4. Join the Workstation to the Domain

  • On the workstation, go to Control Panel > System and Security > System.
  • Click on Change settings under the Computer name section.
  • Click Change and select Domain.
  • Enter the domain name (e.g., yourdomain.local).
  • When prompted, enter domain administrator credentials.

5. Verify Domain Join

  • After a reboot, verify that the workstation is joined to the domain by logging in with a domain account.
  • On the workstation, open Command Prompt and type:
    shell
    echo %userdomain%
    It should return the domain name if the workstation is successfully joined.

6. Check Firewall Settings

  • Ensure that the firewall on both the VPS and the workstation allows communication on necessary ports (e.g., DNS, Kerberos, LDAP, etc.).
    • UDP 53: DNS
    • TCP 88: Kerberos
    • TCP/UDP 389: LDAP
    • TCP 445: SMB

7. Ensure Time Synchronization

  • The workstation and VPS need to be synchronized to the same time. Active Directory relies on time synchronization to function properly. Ensure both systems are set to use the domain controller as their time source.

8. Group Policy (Optional)

  • Once the workstation is part of the domain, you can apply group policies through Group Policy Management on the domain controller to manage workstation settings (security settings, login scripts, etc.).

9. Check Domain Trust

  • Ensure that the domain controller is accessible from the workstation by pinging it (e.g., ping yourdomain.local from the workstation).

10. Troubleshooting

  • If the workstation cannot join the domain, check the event logs for errors related to DNS or authentication.
  • Verify network connectivity between the VPS and the workstation.

By following these steps, you can successfully create a domain on a VPS server and join a workstation within your 192.168.100.xxx IP range to that domain.

Post a Comment

Previous Post Next Post