# exo compute security-group rule add
### Description

This command adds a rule to a Compute instance Security Group.

Supported network protocols: ah, esp, gre, icmp, icmpv6, ipip, tcp, udp

Supported output template annotations: .ID, .Name, .Description, .ExternalSources, .IngressRules, .EgressRules, .Instances

```
exo compute security-group rule add SECURITY-GROUP-ID|NAME [flags]
```

### Options

| Option | Description |
|---------|------------|
|`--description` | rule description |
|`--flow` | rule network flow direction (ingress\|egress) |
|`--help, -h` | help for add |
|`--icmp-code` | rule ICMP code |
|`--icmp-type` | rule ICMP type |
|`--network` | rule target network address (in CIDR format) |
|`--port` | rule network port (format: PORT\|START-END) |
|`--protocol` | rule network protocol |
|`--public-security-group` | rule target Public Security Group NAME |
|`--security-group` | rule target Security Group NAME\|ID |


### Options inherited from parent commands

| Option | Description |
|---------|------------|
|`--config, -C` | Specify an alternate config file [env EXOSCALE_CONFIG] |
|`--output-format, -O` | Output format (table\|json\|text), see &#34;exo output --help&#34; for more information |
|`--output-template` | Template to use if output format is &#34;text&#34; |
|`--quiet, -Q` | Quiet mode (disable non-essential command output) |
|`--timeout` | Per-zone timeout for list operations; -1s disables timeout [env EXOSCALE_TIMEOUT] |
|`--use-account, -A` | Account to use in config file [env EXOSCALE_ACCOUNT] |


### Related Commands

* [rule]({{< ref "../rule">}})	 - Security Group rules management


