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

Security Groups

Security groups act as virtual firewalls that control inbound and outbound traffic for your instances. Each security group contains a set of rules that filter traffic by protocol, port, and source/destination.

Command: ace security-group Alias: ace sg

Create a Security Group

ace sg create --name <name> [flags]

Flags

Flag
Required
Description

--name

Yes

Security group name

--description

No

Description (max 255 characters)

Example

ace sg create --name web-sg --description "Web server security group"

Sample Output

Security group created.
  ID:              a1b2c3d4-e5f6-7890-abcd-ef1234567890
  Name:            web-sg

List Security Groups

Alias: ace sg ls

Sample Output


Get Security Group Details

View a security group and all its rules.

Aliases: ace sg show, ace sg describe

Sample Output


Update a Security Group

Flags

Flag
Required
Description

--name

No

New security group name

--description

No

New description

At least one of --name or --description must be specified.

Example


Delete Security Groups

Alias: ace sg rm

A security group cannot be deleted while it is assigned to active instances. Remove the security group from all instances first.

Example


Rule Management

Add a Rule

Add a firewall rule to a security group.

Flags

Flag
Required
Default
Description

--sg

Yes

Security group ID

--protocol

No

tcp

Protocol (see table below)

--direction

No

ingress

Rule direction: ingress or egress

--port

No

Port or port range (e.g. 22, 8000-9000)

--remote

No

0.0.0.0/0

Remote IP CIDR

--ethertype

No

IPv4

Ethertype: IPv4 or IPv6

--description

No

Rule description

Shortcut Protocols

These shortcuts auto-set the correct port number, so you do not need to specify --port:

Shortcut
Protocol
Port

ssh

TCP

22

http

TCP

80

https

TCP

443

rdp

TCP

3389

mysql

TCP

3306

dns

UDP

53

You can also use the raw protocol names: tcp, udp, icmp, any.

Examples

Allow SSH from anywhere:

Allow HTTP from anywhere:

Allow HTTPS from anywhere:

Allow a custom TCP port:

Allow a port range:

Allow ICMP (ping):

Allow traffic only from a specific CIDR:

Allow all outbound traffic:

Sample Output

Delete Rules

Delete one or more rules by rule ID.

Example


Common Patterns

Web Server Security Group

Database Security Group (Private Access Only)


Command Summary

Command
Description

ace sg create

Create a security group

ace sg list

List all security groups

ace sg get <id>

Get security group details and rules

ace sg update <id>

Update security group name or description

ace sg delete <id>

Delete security group(s)

ace sg rule-add

Add a firewall rule

ace sg rule-delete <id>

Delete firewall rule(s)

Last updated