How to Create a Security Group with RDP, HTTPS, and SSH in AWS
A security group is a set of firewall rules that control the inbound and outbound traffic for your AWS instances. You can create a security group that allows RDP, HTTPS, and SSH access to your instances by following these steps:
- Sign in to the AWS Management Console and open the Amazon EC2 console.
- In the navigation pane, under Network & Security, select Security Groups.
- Click Create Security Group.
- In the Create Security Group dialog box, enter the following information:
- Name: A descriptive name for your security group.
- Description: A brief description of your security group.
- VPC: The VPC that you want to associate your security group with.
- Click Add Rule to add a new inbound rule.
- Type: Select RDP from the drop-down list.
- Source: Select My IP to allow only your IP address to access your instances via RDP. Alternatively, you can select Custom and enter a range of IP addresses or a CIDR block.
- Description: (Optional) Enter a description for the rule.
- Repeat step 5 to add two more inbound rules for HTTPS and SSH.
- Type: Select HTTPS from the drop-down list.
- Source: Enter
0.0.0.0/0
to allow anyone to access your instances via HTTPS. - Description: (Optional) Enter a description for the rule.
- Type: Select SSH from the drop-down list.
- Source: Enter your IP address or a range of IP addresses in the Source column to allow SSH access to your instances.
- Description: (Optional) Enter a description for the rule.
- Click Create. The console will display the details of your new security group.
- To apply the security group to your instances, select the instances that you want to modify and choose Actions, then Networking, then Change security groups. In the Change security groups dialog box, select the security group that you created and choose Assign security groups.
Your security group is now created and applied to your instances. You can now access your instances via RDP, HTTPS, and SSH.
Here are some additional tips for creating security groups:
- Use a descriptive name for your security group so that you can easily identify it later.
- Be specific when defining the inbound rules for your security group. Only allow inbound traffic from the sources that you need to access your instance.
- Use the Source list to control where the inbound traffic is coming from. You can choose to allow traffic from anywhere, from a specific IP address or range of IP addresses, or from a specific VPC.
- You can also create outbound rules to control the traffic that your instance can send out to the internet.