For the complete documentation index, see llms.txt. This page is also available as Markdown.

create

Create a Firewall Rule

Usage

ionosctl compute firewallrule create [flags]

Aliases

For firewallrule command:

[f fr firewall]

For create command:

[c]

Description

Add a new Firewall Rule to the NIC identified by --datacenter-id / --server-id / --nic-id. Every Firewall Rule belongs to exactly one NIC.

A rule WHITELISTS a slice of traffic: while the NIC's firewall is active, traffic is only allowed if a rule matches it (default-deny). --direction selects INGRESS (traffic entering the NIC) or EGRESS (traffic leaving the NIC); it defaults to INGRESS.

--protocol determines which other match flags apply:

  • TCP / UDP -> --port-range-start and --port-range-end restrict the destination port range. Leave both unset to allow all ports.

  • ICMP -> --icmp-type and --icmp-code restrict the ICMP message. Leave unset to allow all types/codes.

  • ANY -> matches every protocol; port and ICMP flags do not apply. --source-mac, --source-ip and --destination-ip narrow the match further for any protocol; any of them left unset acts as a wildcard (allow all).

NOTE: --protocol is fixed at creation time. It cannot be changed later (the update command has no --protocol flag); to change protocol you must delete the rule and create a new one.

Use --wait (-w) to wait for the resource to reach AVAILABLE state.

Required values to run command:

  • Data Center Id

  • Server Id

  • Nic Id

  • Protocol

Options

Examples

Last updated