In this example I am going to create a functional domain called PDT.local it will have a Domain controller a Terminal server and a Member server which I will put on it’s own subnet. I will be allowing access only through the Terminal server from the internet and I will be using this server to connect to the other servers. In a production network I might do this differently but this is just an example.
My servers will be set up as following:
Step 1 Log on to the AWS console and select VPC
Click on the Start VPC Wizard
At the select VPC configuration wizard choose the option that suits you best I am choosing VPC with a Single Public Subnet.
Enter a master CIDR block in this case 192.168.0.0/16 and for the public subnet 192.168.1.0/24
Click Create VPC
The wizard then takes a couple of minutes to create the networking components.
When it is finished click on Subnets
Then Create Subnet
Give the subnet a name tag select the correct VPC and the Availability Zone that you selected earlier and enter a CIDR block. In this case 192.168.2.0/24. This is the subnet where I will be putting the member server.
The next step is to create Security groups there will need to be at least one for each subnet.
Now we need to create rules for the Security Groups.
Click on the Security group and go to the Inbound rules tab then click edit.
I am only going to configure inbound rules but if you need more granular control you can configure outbound rules too.
Click on Edit.
There is a nice feature here now where you get to choose the source security group from a pop up menu. I am going to give all access to the Member servers security group and port 3389 access from the internet. Normally you would lock this down to a specific IP address or range.
For member servers I am locking it down to only traffic from the Domain Controllers Security group I am allowing all traffic but this could be made more specific.
Now it is time to spin up the 3 instances two in the 192.168.1.0 subnet and one in the .2.0 subnet.
Go back into EC2 launch an instance The first one I am going to build is the Terminal Server as that is the one I am connect to the internet.
So just build an instance as normal only on the Configure Instance Details screen choose as follows.
select the 192.168.0.0 Network and the 192.168.1.0/24 subnet and for the internet facing server select enabled under the Auto-assign Public IP choice.
Then just make sure it is in the correct security group.
Then build the other 2 instances taking care to put them in the correct security groups.
While the 3 instances are building I am going to create network interfaces so that I can assign my servers static IP addresses. Actually I am only going to do this for the Domain controller but in a production environment I would do this for all the servers.
So under the EC2 console navigate to Network interfaces
Click Create Network Interface and enter a description, select the correct subnet, enter a private IP address and select the correct security groups for this interface.
Click yes create.
Select the network interface and click attach.
And attach it to the Correct instance.
This server now has two network interfaces you can disable the network interface that has the dynamically assigned IP address from inside the server.
Now it is time to log on.
go to the instance and click connect.
Having logged on the Terminal server I confirm that I can ping the other two servers and then I create RDP connections to them.
For the Domain controller I renamed it and disabled the adapter with the dynamic IP address.
I did the same for the member server and then for the Terminal Server.
Now for the Domain Controller I am going to add the Domain Services role and promote it to a Domain Controller.
Set a local admin password for the other two servers one that is easier to remember than the AWS assigned one or document the AWS assigned one.
The one last step that needs to be done before you can add the servers to the domain is to do an ipconfig /all find out the DNS server address go into the network adapter properties and change the primary DNS server to that of the Domain Controller and the secondary to the DNS server you discovered with ipconfig.
then ping the fully qualified domain name of the DC and you should be able to join the domain.
One interesting point of note is that the Terminal server was not able to ping the DC by it’s name until I added a statically assigned network adaptor. After that all three servers are on the domain and could be configured further.