crusoe networking vpc-firewall-rules create
Create a VPC firewall rule.
Usage
crusoe networking vpc-firewall-rules create --name <name> [flags]
Flags
| Flag | Description |
|---|---|
--action string | [Required] VPC firewall rule action. Allowed actions: ALLOW |
--destination-ports string | VPC firewall rule destination ports. Use 1-65535 to include all ports (default: "1-65535") |
--destinations string | [Required] VPC firewall rule destinations, specified with CIDRs. Multiple destinations can be separated by commas |
--direction string | [Required] VPC firewall rule direction. Allowed directions: INGRESS, EGRESS |
-f, --format string | Output format. Supported formats: pretty, json (default: "pretty") |
-h, --help | Help for create |
--json | Output in json format. Shorthand for --format json |
--name string | [Required] VPC firewall rule name. Alphanumeric characters, underscores and dashes are allowed |
--project-id string | Project ID. Optional if Project Name is set in CRUSOE_DEFAULT_PROJECT env variable or the config file |
--project-name string | Project Name. Optional if set in CRUSOE_DEFAULT_PROJECT env variable or the config file |
--protocols string | [Required] Network protocols. Multiple protocols can be separated by commas. Allowed: TCP, UDP, ICMP |
--source-ports string | VPC firewall rule source ports. Use 1-65535 to include all ports (default: "1-65535") |
--sources string | [Required] VPC firewall rule sources, specified with CIDRs. Multiple sources can be separated by commas |
--vpc-network-id string | [Required] VPC network ID for the network in which to apply this rule |
Examples
Allow all inbound TCP traffic on port 22 (SSH):
crusoe networking vpc-firewall-rules create \
--name allow-ssh \
--action ALLOW \
--direction INGRESS \
--protocols TCP \
--sources 0.0.0.0/0 \
--destinations 10.0.0.0/8 \
--source-ports 1-65535 \
--destination-ports 22 \
--vpc-network-id <vpc-network-id>