Skip to content

Commit 6575e4f

Browse files
author
Matthew Fisher
committed
fix(contrib/ec2): be more restrictive with ports
1 parent 08d6d24 commit 6575e4f

1 file changed

Lines changed: 41 additions & 6 deletions

File tree

contrib/ec2/deis.template

Lines changed: 41 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,8 @@
8080
"GroupDescription": "Deis SecurityGroup",
8181
"SecurityGroupIngress": [
8282
{"IpProtocol": "tcp", "FromPort": "80", "ToPort": "80", "CidrIp": "0.0.0.0/0"},
83-
{"IpProtocol": "tcp", "FromPort": "514", "ToPort": "514", "CidrIp": "0.0.0.0/0"},
8483
{"IpProtocol": "tcp", "FromPort": "2222", "ToPort": "2222", "CidrIp": "0.0.0.0/0"},
85-
{"IpProtocol": "tcp", "FromPort": "5000", "ToPort": "5000", "CidrIp": "0.0.0.0/0"},
86-
{"IpProtocol": "tcp", "FromPort": "5432", "ToPort": "5432", "CidrIp": "0.0.0.0/0"},
87-
{"IpProtocol": "tcp", "FromPort": "6379", "ToPort": "6379", "CidrIp": "0.0.0.0/0"},
88-
{"IpProtocol": "tcp", "FromPort": "8000", "ToPort": "8000", "CidrIp": "0.0.0.0/0"},
89-
{"IpProtocol": "tcp", "FromPort": "49156", "ToPort": "65535", "CidrIp": "0.0.0.0/0"}
84+
{"IpProtocol": "tcp", "FromPort": "8000", "ToPort": "8000", "CidrIp": "0.0.0.0/0"}
9085
]
9186
}
9287
},
@@ -106,6 +101,46 @@
106101
}
107102
}
108103
},
104+
"Ingress514": {
105+
"Type": "AWS::EC2::SecurityGroupIngress",
106+
"Properties": {
107+
"GroupName": {"Ref": "DeisSecurityGroup"}, "IpProtocol": "tcp", "FromPort": "514", "ToPort": "514", "SourceSecurityGroupId": {
108+
"Fn::GetAtt" : [ "DeisSecurityGroup", "GroupId" ]
109+
}
110+
}
111+
},
112+
"Ingress5000": {
113+
"Type": "AWS::EC2::SecurityGroupIngress",
114+
"Properties": {
115+
"GroupName": {"Ref": "DeisSecurityGroup"}, "IpProtocol": "tcp", "FromPort": "5000", "ToPort": "5000", "SourceSecurityGroupId": {
116+
"Fn::GetAtt" : [ "DeisSecurityGroup", "GroupId" ]
117+
}
118+
}
119+
},
120+
"Ingress5432": {
121+
"Type": "AWS::EC2::SecurityGroupIngress",
122+
"Properties": {
123+
"GroupName": {"Ref": "DeisSecurityGroup"}, "IpProtocol": "tcp", "FromPort": "5432", "ToPort": "5432", "SourceSecurityGroupId": {
124+
"Fn::GetAtt" : [ "DeisSecurityGroup", "GroupId" ]
125+
}
126+
}
127+
},
128+
"Ingress6379": {
129+
"Type": "AWS::EC2::SecurityGroupIngress",
130+
"Properties": {
131+
"GroupName": {"Ref": "DeisSecurityGroup"}, "IpProtocol": "tcp", "FromPort": "6379", "ToPort": "6379", "SourceSecurityGroupId": {
132+
"Fn::GetAtt" : [ "DeisSecurityGroup", "GroupId" ]
133+
}
134+
}
135+
},
136+
"IngressEphemeral": {
137+
"Type": "AWS::EC2::SecurityGroupIngress",
138+
"Properties": {
139+
"GroupName": {"Ref": "DeisSecurityGroup"}, "IpProtocol": "tcp", "FromPort": "49156", "ToPort": "65535", "SourceSecurityGroupId": {
140+
"Fn::GetAtt" : [ "DeisSecurityGroup", "GroupId" ]
141+
}
142+
}
143+
},
109144
"CoreOSServerAutoScale": {
110145
"Type": "AWS::AutoScaling::AutoScalingGroup",
111146
"Properties": {

0 commit comments

Comments
 (0)