Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the CidrIp in Security groups

I am creating a self ingress rule in a security group. I have created a CloudFormation template for the security groups, but I couldn't understand what is the CidrIp that I need to give here:

"SelfIngress1": [
          {
            "IpProtocol" : "tcp",
            "FromPort"   : "7600",
            "ToPort"     : "7600",
            "CidrIp"     : "10.0.0.0/1"
          },

What is the CidrIp that I have to provide here? Do I have to get it from the subnet where the VPC associates?

like image 392
user10146200 Avatar asked Dec 23 '22 05:12

user10146200


1 Answers

From AWS::EC2::SecurityGroupIngress - AWS CloudFormation:

CidrIp

An IPv4 CIDR range.

For an overview of CIDR ranges, go to the Wikipedia Tutorial.

That field defines the IP address range (in CIDR notation) that is permitted to send inbound traffic through the security group.

Your security group is permitting inbound traffic on port 7200, but it also needs an IP address range, such as:

  • 0.0.0.0/0 means from the whole Internet
  • 11.22.33.44/32 means only from 11.22.33.44
  • 10.5.2.0/24 means only from 10.5.2.x (with anything as the last number)
like image 138
John Rotenstein Avatar answered Jan 03 '23 23:01

John Rotenstein