|
| 1 | +--- |
| 2 | +layout: default |
| 3 | +parent: auth0 network-acl |
| 4 | +has_toc: false |
| 5 | +--- |
| 6 | +# auth0 network-acl create |
| 7 | + |
| 8 | +Create a new network ACL. |
| 9 | +To create interactively, use "auth0 network-acl create" with no arguments. |
| 10 | +To create non-interactively, supply the required parameters (description, active, priority, and rule) through flags. |
| 11 | +The --rule parameter is required and must contain a valid JSON object with action, scope, and match properties. |
| 12 | + |
| 13 | +## Usage |
| 14 | +``` |
| 15 | +auth0 network-acl create [flags] |
| 16 | +``` |
| 17 | + |
| 18 | +## Examples |
| 19 | + |
| 20 | +``` |
| 21 | + auth0 network-acl create |
| 22 | + auth0 network-acl create --description "Block IPs" --priority 1 --active true --rule '{"action":{"block":true},"scope":"tenant","match":{"ipv4_cidrs":["192.168.1.0/24","10.0.0.0/8"]}}' |
| 23 | + auth0 network-acl create --description "Geo Block" --priority 2 --active true --rule '{"action":{"block":true},"scope":"authentication","match":{"geo_country_codes":["US","CA"]}}' |
| 24 | + auth0 network-acl create --description "Redirect Traffic" --priority 3 --active true --rule '{"action":{"redirect":true,"redirect_uri":"https://example.com"},"scope":"management","match":{"ipv4_cidrs":["192.168.1.0/24"]}}' |
| 25 | + auth0 network-acl create -d "Block Bots" -p 4 --active true --rule '{"action":{"block":true},"scope":"tenant","match":{"user_agents":["badbot/*","malicious/*"],"ja3_fingerprints":["deadbeef","cafebabe"]}}' |
| 26 | + auth0 network-acl create --description "Complex Rule" --priority 5 --active true --rule '{"action":{"block":true},"scope":"tenant","match":{"ipv4_cidrs":["192.168.1.0/24"],"geo_country_codes":["US"]}}' |
| 27 | +``` |
| 28 | + |
| 29 | + |
| 30 | +## Flags |
| 31 | + |
| 32 | +``` |
| 33 | + --action string Action for the rule (block, allow, log, redirect) |
| 34 | + --active string Whether the network ACL is active (required, 'true' or 'false') |
| 35 | + --asns ints Comma-separated list of ASNs to match (Eg. 64496,64497,64498) |
| 36 | + --country-codes strings Comma-separated list of country codes to match (Eg. US,CA,MX) |
| 37 | + -d, --description string Description of the network ACL (required) |
| 38 | + --ipv4-cidrs strings Comma-separated list of IPv4 CIDR ranges (Eg. 192.168.1.0/24,10.0.0.0/8) |
| 39 | + --ipv6-cidrs strings Comma-separated list of IPv6 CIDR ranges (Eg. 2001:db8::/32,2001:db8:1234::/48) |
| 40 | + --ja3-fingerprints strings Comma-separated list of JA3 fingerprints to match (Eg. deadbeef,cafebabe) |
| 41 | + --ja4-fingerprints strings Comma-separated list of JA4 fingerprints to match (Eg. t13d1516h2_8daaf6152771) |
| 42 | + --json Output in json format. |
| 43 | + -p, --priority int Priority of the network ACL (required, 1-10) |
| 44 | + --redirect-uri string URI to redirect to when action is redirect |
| 45 | + --rule string Network ACL rule configuration in JSON format (required for non-interactive mode) |
| 46 | + --scope string Scope of the rule (management, authentication, tenant) |
| 47 | + --subdivision-codes strings Comma-separated list of subdivision codes to match (Eg. US-NY,US-CA) |
| 48 | + --user-agents strings Comma-separated list of user agents to match (Eg. badbot/*,malicious/*) |
| 49 | +``` |
| 50 | + |
| 51 | + |
| 52 | +## Inherited Flags |
| 53 | + |
| 54 | +``` |
| 55 | + --debug Enable debug mode. |
| 56 | + --no-color Disable colors. |
| 57 | + --no-input Disable interactivity. |
| 58 | + --tenant string Specific tenant to use. |
| 59 | +``` |
| 60 | + |
| 61 | + |
| 62 | +## Related Commands |
| 63 | + |
| 64 | +- [auth0 network-acl create](auth0_network-acl_create.md) - Create a new network ACL |
| 65 | +- [auth0 network-acl delete](auth0_network-acl_delete.md) - Delete a network ACL |
| 66 | +- [auth0 network-acl list](auth0_network-acl_list.md) - List network ACLs |
| 67 | +- [auth0 network-acl show](auth0_network-acl_show.md) - Show a network ACL |
| 68 | +- [auth0 network-acl update](auth0_network-acl_update.md) - Update a network ACL |
| 69 | + |
| 70 | + |
0 commit comments