Forum Discussion

Jackrigby's avatar
Jackrigby
Copper Contributor
Oct 20, 2022

Connecting an existing domain to another windows server.

I am new to EC2's and am wanting to create a server that I can connect people on remotely.

I have created a domain called "test.r1" I have a static IP on the EC2.

Do i need to configure this on server manager. If so how do I do this. Through IPV4 properties.

On the other server I have tried to add a domain controller to an existing domain but when typing the domain "test.r1" it displays "the server is not operational"

I have been stuck trying to figure out why I can't connect my domain to this EC2

 

  • Ankido's avatar
    Ankido
    Brass Contributor

    To set up an EC2 instance as a domain controller (DC) and connect it to a domain (e.g., test.r1), follow these steps. I’ll also address potential issues like "The server is not operational."

    Steps to Configure EC2 as a Domain Controller:

    1. Prepare Your EC2 Instance:

    • Ensure your EC2 instance has a static public IP address (Elastic IP) if it needs to be accessible over the internet.
    • Configure the security groups to allow required traffic:
      • Open the following ports for Active Directory (AD):
        • TCP 53 (DNS)
        • TCP/UDP 88 (Kerberos)
        • TCP 135 (RPC)
        • TCP 389 (LDAP)
        • TCP 636 (LDAPS)
        • TCP 445 (SMB)

    2. Install Active Directory Domain Services (AD DS):

    • Open Server Manager on your EC2 instance.
    • Add the Active Directory Domain Services role.
    • After installation, click Promote this server to a domain controller.

    3. Domain Setup:

    When promoting the server, choose one of the following:

    • Create a new forest and domain if test.r1 is a new domain.
    • Add a domain controller to an existing domain if test.r1 already exists.

    4. Configure DNS Settings:

    • If creating a new domain:
      • Set the server to point to itself for DNS resolution. Go to IPv4 properties and set the Preferred DNS Server to the server’s private IP.
    • If joining an existing domain:
      • Ensure the server points to the DNS server for the existing domain.

    5. Troubleshooting "The server is not operational":

    This error often indicates DNS misconfiguration or connectivity issues. Check the following:

    • DNS Resolution: Ensure the EC2 instance can resolve the domain name test.r1. Run: nslookup test.r1
    • Connectivity: Verify that the instance can reach the domain controller for test.r1 (if joining an existing domain).
    • Ports: Ensure necessary ports (mentioned in step 1) are open between the EC2 instance and the domain.

    6. Add EC2 to an Existing Forest:

    • If connecting to an existing forest, choose Add a domain controller to an existing domain during the AD DS role configuration.
    • Provide credentials for a user with sufficient privileges in the domain.

    Additional Notes:

    • Network Configuration in AWS:
      • Ensure the EC2 instance is in a properly configured VPC and subnets.
      • Check that the route tables and security groups allow communication between your EC2 instance and other resources in the domain.
    • Domain Name Validation:
      • Confirm that test.r1 is correctly configured and resolves properly.

     

Resources