--- title: "addAccessControlGroupInboundRule" slug: "cli-vserver-acg-addaccesscontrolgroupinboundrule" tags: ["ACG", "VPC", "Server"] updated: 2026-09-17T10:08:33Z published: 2026-09-17T10:08:33Z canonical: "cli.ncloud-docs.com/cli-vserver-acg-addaccesscontrolgroupinboundrule" --- > ## Documentation Index > Fetch the complete documentation index at: https://cli.ncloud-docs.com/llms.txt > Use this file to discover all available pages before exploring further. # addAccessControlGroupInboundRule Available in VPC Add an inbound rule to an ACG. ## Syntax The `addAccessControlGroupInboundRule` syntax is as follows: ``` ./ncloud vserver addAccessControlGroupInboundRule \ --vpcNo \ --accessControlGroupNo \ --accessControlGroupRuleList \ [--regionCode ] \ [--output ] ``` ## Options This section describes the options available when running `addAccessControlGroupInboundRule`. ### Required options The following options are required for `addAccessControlGroupInboundRule`. | Options | Type | Required | Description | | --- | --- | --- | --- | | `--vpcNo` | String | Required | VPC number - See [getVpcList](/docs/en/cli-vpc-vpcmanagement-getvpclist). | | `--accessControlGroupNo` | String | Required | ACG number - See [getAccessControlGroupList](/docs/en/cli-vserver-acg-getaccesscontrolgrouplist). | | `--accessControlGroupRuleList` | List | Required | List of ACG inbound rules - For each rule, enter {field=‘value’} pairs enclosed in quotes, separated by commas. - `protocolTypeCode` (required): Protocol type code. `TCP` \| `UDP` \| `ICMP` \| `1`~`254` (See [Protocol number](https://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)) - `ipBlock` (conditional): Source IP address block. Can't be used at the same time with `accessControlGroupSequence`. Example: `0.0.0.0/0`, `100.10.20.0/24` - `accessControlGroupSequence` (conditional): Source ACG number. Can't be used at the same time with `ipBlock`. See [getAccessControlGroupList](/docs/en/cli-vserver-acg-getaccesscontrolgrouplist). - `portRange` (conditional): Allowed ports. Enter a single port or a port range. Required if `protocolTypeCode` is `TCP` (`6`) or `UDP` (`17`). Example: `22`, `1-65535` - `accessControlGroupRuleDescription` (optional): ACG inbound rule description (0-1000 bytes) | ### Common options For information about the options common to all `vserver` subcommands, see [Server (VPC) options](/docs/en/cli-vserver#%EC%98%B5%EC%85%98). ## Examples If the request to add an inbound rule to an ACG is successful, the protocol information and access source for each rule are returned. ### Command The command example is as follows: ``` ./ncloud vserver addAccessControlGroupInboundRule \ --vpcNo 12345678 \ --accessControlGroupNo 67890123 \ --accessControlGroupRuleList "protocolTypeCode='TCP', ipBlock='192.0.2.0/24', portRange='22', accessControlGroupRuleDescription='SSH from office'" \ --regionCode KR \ --output json ``` ### Output The output example is as follows: ``` { "addAccessControlGroupInboundRuleResponse": { "totalRows": 1, "accessControlGroupRuleList": [ { "accessControlGroupNo": "67890123", "protocolType": { "code": "TCP", "codeName": "tcp", "number": 6 }, "ipBlock": "192.0.2.0/24", "accessControlGroupSequence": "", "portRange": "22", "accessControlGroupRuleType": { "code": "INBND", "codeName": "Inbound" }, "accessControlGroupRuleDescription": "SSH from office" } ], "requestId": "c3d4e5f6-7890-1234-cdef-345678901234", "returnCode": "0", "returnMessage": "success" } } ```