官术网_书友最值得收藏!

Security groups

A security group is a virtual firewall. It manages the traffic flow from and to AWS instances. It is easy to associate a security group with instances in AWS as you can do this while creating an instance. You can assign up to five security groups at the time of launching an instance or after launching the instance. Each security group can serve one or more instances. Security groups are associated with the primary network interface (eth0) of an instance.

Each AWS account comes with a default security group for each VPC and each region. By default, instances are associated with the default security group. The default security group can't be deleted, but it allows all inbound traffic from other instances associated with the default security group and all outbound traffic from the instance.

There are some differences between security groups for EC2-Classic and EC2-VPC. You can find out more at http://docs.aws.amazon.com/AmazonVPC/latest/UserGuide/VPC_SecurityGroups.html#VPC_Security_Group_Differences.

Let's try and create a security group and look at what we can do:

  1. Go to the EC2 or VPC dashboard via Network & SecuritySecurity Groups and click on Create Security Group.
  2. Provide a Security group name and select the VPC that the security group belongs to.
  3. You need to configure security rules for inbound and outbound traffic. Based on these rules, traffic is controlled with the use of a security group in AWS. By default, a security group includes an outbound rule that allows all outbound traffic:
  1. Click on Add Rule and select Type, Protocol, Port Range, Source, and Description.
  2. You can create one or multiple rules based on your requirements:
  1. Click on Create and verify the security group in the EC2 Dashboard or VPC Dashboard.

If the instance or the web server is not accessible via PuTTY or a web browser, then you need to troubleshoot the issue. To do this, you need to figure out whether everything is fine with the security group and whether the appropriate rules have been configured or not.

If you change the inbound or outbound traffic rules, then they will be applied to the instances immediately.

主站蜘蛛池模板: 建平县| 赤水市| 合阳县| 万源市| 徐汇区| 武鸣县| 武川县| 革吉县| 陈巴尔虎旗| 新平| 南平市| 潮安县| 拜城县| 桦川县| 南阳市| 峨眉山市| 上虞市| 安阳市| 红河县| 遵义县| 西充县| 沾益县| 宜黄县| 邹平县| 青州市| 山东省| 沾化县| 闻喜县| 沈阳市| 高台县| 阳东县| 芜湖县| 栾城县| 广宁县| 乐东| 洛隆县| 河池市| 古浪县| 西华县| 元氏县| 潜山县|