| Did this page help you? Yes No Tell us about it... |
Replaces an entry (i.e., rule) in a network ACL. For more information about network ACLs, go to Network ACLs in the Amazon Virtual Private Cloud User Guide.
The short version of this command is ec2repnae.
ec2-replace-network-acl-entry
acl_id -n rule_number [--egress] -P protocol -r
cidr [-p port_range] [-t icmp_type_code] {
--allow | --deny }
| Name | Description | Required |
|---|---|---|
|
|
ID of the ACL where the entry will be replaced. Type: String Default: None Example: acl-5fb85d36 |
Yes |
|
|
Rule number of the entry to replace. Type: Number Default: None Example: -n 100 |
Yes |
--egress
|
Optional flag to indicate to replace the egress rule. Default: If no value is specified, we replace the ingress rule | No |
|
|
IP protocol. You can specify Type: String Valid Values: Example: -P 6 |
Yes |
-r, --cidr
cidr
|
The CIDR range to allow or deny, in CIDR notation. Type: String Default: None Example: -r 172.16.0.0/24 | Yes |
|
|
For the TCP or UDP protocols, this specifies the range of ports to allow. Type: String Default: None Valid Values: A single integer or a range (min-max). You can specify -1 to mean all ports (i.e. port range 0-65535). Condition: Required if specifying Example: -p 80-84 |
Conditional |
|
|
For the ICMP protocol, this specifies the ICMP type and code using format Type: String Default: None Condition: Required if specifying Example: -t -1:-1 |
Conditional |
|
|
Specifies that any traffic matching the rule is allowed. Condition: Either --allow or --deny must be specified, but not both. |
Conditional |
|
|
Specifies that any traffic matching the rule is denied. Condition: Either --allow or --deny must be specified, but not both. |
Conditional |
| Option | Description |
|---|---|
|
|
Overrides the Region specified in the Default: The Example: |
|
|
Default: The Example: |
|
|
The private key to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
The X.509 certificate to use when constructing requests to Amazon EC2. Default: The value of the Example: |
|
|
Specifies a connection timeout (in seconds). Example: --connection-timeout 30 |
|
|
Specifies a request timeout (in seconds). Example: --request-timeout 45 |
|
|
Displays verbose output by showing the SOAP request and response on the command line. This is particularly useful if you are building tools to talk directly to our SOAP API. |
|
|
Displays column headers in the output. |
|
|
Shows empty columns as |
|
|
Do not display tags for tagged resources. |
|
|
Prints internal debugging information. This is useful to assist us when troubleshooting problems. |
|
|
Displays Help. |
|
|
If Example: |
The command returns a table that contains the following information:
Boolean true or false
Amazon EC2 command line tools display errors on stderr.
This example replaces the egress entry numbered 110 in the network ACL with ID acl-2cb85d45. The new rule denies egress traffic destined for anywhere (0.0.0.0/0) on TCP port 139.
PROMPT> ec2-replace-network-acl-entry acl-2cb85d45 -n 110 --egress -r 0.0.0.0/0 -P tcp -p 139 --deny
RETURN true