EC2-CREATE-NETWORK-ACL-ENTRY(1)
EC2-CREATE-NETWORK-ACL-ENTRY(1) π¦π
ok so bestie, welcome to the User Commands section of the manual, and this page is entirely about ec2-create-network-acl-entry β aka ec2addnae β the little command that adds a rule to a network ACL. yes it's giving firewall energy, yes you're gonna slay. let's go β¨
π NAME π
ec2-create-network-acl-entry β Create a network ACL entry π«Ά
β¨ SYNOPSIS β¨
ec2addnae ([ec2-create-network-acl-entry])
ec2addnae [GENERAL OPTIONS] NETWORK_ACL -n RULE_NUMBER -r CIDR
[--egress] -P PROTOCOL (-p PORT_RANGE | -t ICMP_TYPE_CODE) {--allow |
--deny}
like, that's the whole vibe in four lines. ec2addnae is the main character here π
πΈ GENERAL NOTES πΈ
ngl this is the part you don't wanna skip: any command option or parameter may be passed a value of - to say "hey, read the values for this one from stdin instead". that's it, that's the note. iconic behavior fr fr π
π DESCRIPTION π
Create a network ACL entry. periodt.
NETWORK_ACL is the network acl ID to which to add the entry β so you gotta know which ACL you're blessing with a new rule before you do anything. no ACL ID, no rule, bestie π
π§ GENERAL OPTIONS π§
these are the options that every command in this family shares. they're the group chat, and the specific options below are the main character π
-O,--aws-access-key KEYβ your AWS Access Key ID. defaults to whatever theAWS_ACCESS_KEYenvironment variable is set to (if it's set at all).-W,--aws-secret-key KEYβ your AWS Secret Access Key. defaults to the value of theAWS_SECRET_KEYenvironment variable (if set).-T,--security-token TOKENβ AWS delegation token. defaults to the value of theAWS_DELEGATION_TOKENenvironment variable (if set).-K,--private-key KEYβ π¨[DEPRECATED]π¨ specifyKEYas the private key to use. defaults to the value of theEC2_PRIVATE_KEYenvironment variable (if set). overrides the default.-C,--cert CERTβ π¨[DEPRECATED]π¨ specifyCERTas the X509 certificate to use. defaults to the value of theEC2_CERTenvironment variable (if set). overrides the default.-U,--url URLβ specifyURLas the web service URL to use. defaults to the value ofhttps://ec2.amazonaws.com(us-east-1) or to that of theEC2_URLenvironment variable (if set). overrides the default.--region REGIONβ specifyREGIONas the web service region to use. this option will override the URL specified by the-U URLoption and theEC2_URLenvironment variable. it defaults to the region specified by theEC2_URLenvironment variable, orus-east-1if that environment variable is not set.-D,--auth-dry-runβ check if you can perform the requested action rather than actually performing it. a little vibe check before the real thing π-v,--verboseβ verbose output. give me all the lore.-?,--helpβ display this help.-H,--headersβ display column headers.--debugβ display additional debugging information.--show-empty-fieldsβ indicate empty fields.--hide-tagsβ do not display tags for tagged resources.--connection-timeout TIMEOUTβ specify a connection timeoutTIMEOUT(in seconds).--request-timeout TIMEOUTβ specify a request timeoutTIMEOUT(in seconds).
π SPECIFIC OPTIONS π
now THIS is the section that actually builds your rule. it's giving bespoke. it's giving custom. let's break it down π
-n,--rule-number RULE_NUMBERβ the rule number to add. π’-r,--cidr CIDRβ the IP range to regulate.-P,--protocol PROTOCOLβ the IP protocol to regulate. set it to'all'for wildcard. π-p,--port-range PORT_RANGEβ the port range to regulate (TCP and UDP only, bestie, don't try it anywhere else).-t,--icmp-type-code ICMP_TYPE_CODEβ the ICMP type and code to regulate.--allowβ sets the action to be taken on packets matching the rule to'allow'. you must specify either this or deny β pick a side, no fence-sitting π--denyβ sets the action to be taken on packets matching the rule to'deny'. you must specify either this or allow. same rule, flipped energy.--egressβ specifies an egress rule. the rule is otherwise assumed to be ingress.
β οΈ real talk: you gotta pick exactly one of--allowor--deny, and you gotta pick exactly one of-p PORT_RANGEor-t ICMP_TYPE_CODE(see that( β¦ | β¦ )in the synopsis? that's the choose-one vibe). and yes,--egressis opt-in only β no flag means ingress, periodt.
π SEE ALSO π
go read the source of truth, bestie, it's all there:
http://docs.amazonwebservices.com/AWSEC2/2014-05-01/CommandLineReferencehttp://docs.amazonwebservices.com/AWSEC2/latest/CommandLineReference
and that's the whole page!! this one came from the EC2 API command line tools, version 1.6.14.1, api=2014-05, and it lives in the manual as EC2-CREATE-NETWORK-ACL-ENTRY(1). mwah, go add some ACL entries, you got this π«Άβ¨π
π¦ where this page comes from
- ubuntu jammy: ec2-api-tools 1.6.14.1-0ubuntu1
- ubuntu noble: ec2-api-tools 1.6.14.1-0ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms