A network ACL that whitelists inbound and outbound traffic based on Port(s) and blocks all other traffic.

 
Items
5
Size
1.2 KB
Missing Parameters
AWSTemplateFormatVersion: '2010-09-09'
Resources:
  NetworkAcl:
    Type: 'AWS::EC2::NetworkAcl'
    Properties:
      VpcId: ''
  IngressRule0:
    Type: 'AWS::EC2::NetworkAclEntry'
    Properties:
      Egress: false
      NetworkAclId:
        Ref: NetworkAcl
      CidrBlock: 0.0.0.0/0
      Protocol: tcp
      PortRange:
        From: ''
        To: ''
      RuleNumber: '100'
      RuleAction: allow
  IngressRule1:
    Type: 'AWS::EC2::NetworkAclEntry'
    Properties:
      Egress: false
      NetworkAclId:
        Ref: NetworkAcl
      CidrBlock: 0.0.0.0/0
      Protocol: '-1'
      RuleNumber: '200'
      RuleAction: deny
  EgressRule0:
    Type: 'AWS::EC2::NetworkAclEntry'
    Properties:
      Egress: true
      NetworkAclId:
        Ref: NetworkAcl
      CidrBlock: 0.0.0.0/0
      Protocol: tcp
      PortRange:
        From: ''
        To: ''
      RuleNumber: '100'
      RuleAction: allow
  EgressRule1:
    Type: 'AWS::EC2::NetworkAclEntry'
    Properties:
      Egress: true
      NetworkAclId:
        Ref: NetworkAcl
      CidrBlock: 0.0.0.0/0
      Protocol: '-1'
      RuleNumber: '200'
      RuleAction: deny
Parameters: {}
Metadata: {}
Conditions: {}

Customize Cf Template
 
* Required field