Skip to content

ezgh compute firewalls create

Create a firewall.

Updated View as Markdown
ezgh compute firewalls create <name> [--description d] [-f rules.json|--no-rules] [--tag k=v…] [flags]

Create a firewall. Without -f it gets two rules allowing all outbound traffic (IPv4 and IPv6); -f gives its rules instead (a file, or - for stdin: a JSON array of rules, or an object with “rules”), and --no-rules none. Inbound traffic is denied unless a rule allows it.

A rule is {“direction”: “inbound”|“outbound”, “protocol”: “tcp”|“udp”|“icmp”|“icmpv6”|“all”|<number>, “ports”: {“from”: 22, “to”: 22}, “icmp”: {“type”: 8, “code”: null}, “peer”: {“cidr”: “0.0.0.0/0”} or {“firewallId”: “fwl_…”}, “description”: “…”}; ports and icmp are optional (every one).

Part of ezgh compute firewalls.

Examples

ezgh compute firewalls create web
ezgh compute firewalls create db --no-rules

Flags

Flag Type Default Description
--description string what it’s for
-f, --file string its rules: a JSON file, or - for stdin
--no-rules boolean no rules at all (not even outbound)
--tag string, repeatable a tag, key=value (repeat)

This command also takes the global flags.

Navigation

Type to search…

↑↓ navigate↵ selectEsc close