AWS Security Groups Overview
Access to an AWS cloud instance can be controlled by
- an external firewall,
- the operating system firewall of the instance,
- AWS security groups, and
- AWS network ACLs.
A network ACL applies to a subnet as a whole. Only one network ACL per subnet is allowed. The rules in a network ACL are stateless (i.e., return traffic must be explicitly allowed). Rules can be defined for inbound or outbound traffic, they can allow or deny traffic, and they are evaluated starting from the lowest rule number. After the first match the search is terminated. The default network ACL allows all inbound and outbound IP traffic.
A security group can be seen as a virtual firewall that controls the traffic for one or more instances. When you launch an instance, you must assign a security group to the instance. If no custom security group is specified, a default security group will be created and associated with the instance. You can add rules to each security group that allow traffic to or from its associated instances. The rules of a security group can be modified at any time, and the modifications are automatically applied to all instances that are associated with the security group. If there is more than one security group associated with an instance, the rules of all groups are combined.
Security groups in a VPC are associated with network interfaces. Changing an instance's security groups changes the security groups associated with the primary network interface (eth0). Additional security groups can be associated with any other network interfaces added to an instance.
Points to note with respect to security groups:
- By default, all outbound traffic is allowed.
- Rules in a security group always define what is permitted. They cannot be used to deny specific traffic.
- Response traffic to traffic that was permitted by a rule is always allowed (connection tracking).
- A security group cannot allow more permissive access to a subnet than the permitted traffic defined in the network ACL of the subnet.
Please see the relevant AWS documentation for more information and configuration details.
Connecting to the Cloud Instance
During the configuration of your instance you should have created a security group allowing at the minimum SSH access to the instance. If this has been done correctly, you can, for example, use SSH from the command-line or from a tool such as PuTTY to access the command-line of the user sshuser (for Charon-SSP prepackaged marketplace images) or your custom user (for RPM installations) on the Charon-SSP instance.
Please note: PuTTY uses a different key file format. It comes with tools to convert between its own .ppk
format and the format of OpenSSH used by the default Linux tools.
If you select your instance in the instance list and then click on Connect, you will see the instructions for connecting via SSH.
As shown in the image below, you will see in particular
- the name of the private key that must be used to connect to the instance,
- the public DNS name of the instance, and
- a sample user name that must be adapted to the actual user name to be used for your instance.
Please note: the file permissions of the private key file must be set such that the file is only readable by the user (e.g., #
chmod 400 <private-key-file>
).
There are several ways to connect to your Charon-SSP cloud instance using this basic SSH protocol access. Some of them are described in the following sections below.