NetworkConfig / VpcConfig | VpcTemplatesConfig / NetworkAclConfig / NetworkAclInboundRuleConfig

Network ACL inbound rule configuration.

Use this configuration to define inbound rules for your network ACLs. An inbound rule allows or denies specific inbound traffic at the subnet level.

The following example allows inbound SSH traffic from source CIDR 10.0.0.0/16:

- rule: 200
protocol: 6
fromPort: 22
toPort: 22
action: allow
source: 10.0.0.0/16
interface INetworkAclInboundRuleConfig {
    action: AllowDeny;
    fromPort: number;
    protocol: number;
    rule: number;
    source: string | INetworkAclSubnetSelection;
    toPort: number;
}

Properties

action: AllowDeny

The action for the network ACL rule.

fromPort: number

The port to start from in the network ACL rule.

protocol: number

The IANA protocol number for the network ACL rule. You may also specify -1 for all protocols.

rule: number

The rule ID number for the rule.

CAUTION: Changing this property value causes the rule to be recreated. This may temporarily impact your network traffic while the rule is updated.

Rules are evaluated in order from low to high and must be unique per direction. As soon as a rule matches traffic, it's applied regardless of any higher-numbered rule that might contradict it.

The source of the network ACL rule.

Possible values are a CIDR range or a network ACL subnet selection configuration.

NetworkAclSubnetSelection

toPort: number

The port to end with in the network ACL rule.