Managing custom traffic types

You can create custom traffic types, add them to multiple networks, edit, and delete.

Limitations

  • If you create allow rules but leave the deny list empty, all incoming traffic will still be allowed.
  • You cannot change the name of a traffic type, if it is assigned to any network.

To create a custom traffic type

Admin panel

  1. On the Infrastructure > Networks screen, click Create traffic type.
  2. In the Create traffic type window, specify a traffic type name and port to open. Traffic type names must be alphanumeric and 3 to 32 characters long.
  3. In the Access rules section, do the following:

    • To block traffic from particular IP addresses, IP address ranges, or subnets, specify them in the Deny list section.
    • To allow traffic from particular IP addresses, IP address ranges, or subnets, specify them in the Allow list section. Additionally, specify 0.0.0.0/0 in the Deny list section, to block all other traffic.

  4. Click Create.

Command-line interface

Use the following command:

vinfra cluster traffic-type create --port <port> [--inbound-allow-list <addresses>]
                                   [--inbound-deny-list <addresses>] <traffic-type-name>
--port <port>
Traffic type port
--inbound-allow-list <addresses>
A comma-separated list of IP addresses
--inbound-deny-list <addresses>
A comma-separated list of IP addresses
<traffic-type-name>
Traffic type name

For example, to create a custom traffic type MyTrafficType on port 6900, run:

# vinfra cluster traffic-type create "MyTrafficType" --port 6900
+--------------------+---------------+
| Field              | Value         |
+--------------------+---------------+
| exclusive          | False         |
| hidden             | False         |
| inbound_allow_list | []            |
| inbound_deny_list  | []            |
| name               | MyTrafficType |
| port               | 6900          |
| type               | custom        |
+--------------------+---------------+

The created traffic type will appear in the vinfra cluster traffic-type list output:

# vinfra cluster traffic-type list -c name -c type -c exclusive -c port
+-----------------------+------------+-----------+------+
| name                  | type       | exclusive | port |
+-----------------------+------------+-----------+------+
| Storage               | predefined | True      |      |
| Internal management   | predefined | True      |      |
| OSTOR private         | predefined | True      |      |
| S3 public             | predefined | False     |      |
| iSCSI                 | predefined | False     |      |
| NFS                   | predefined | False     |      |
| Backup (ABGW) private | predefined | True      |      |
| Backup (ABGW) public  | predefined | False     |      |
| Admin panel           | predefined | False     |      |
| SSH                   | predefined | False     |      |
| VM public             | predefined | False     |      |
| VM private            | predefined | True      |      |
| Compute API           | predefined | True      |      |
| MyTrafficType         | custom     | False     | 6900 |
+-----------------------+------------+-----------+------+

To assign, reassign, or unassign a custom traffic type

Admin panel

  1. On the Infrastructure > Networks screen, click Assign to networks next to the Custom traffic types section.
  2. Add the needed traffic type to or remove it from your networks by selecting the corresponding check boxes.
  3. Click Save to apply the changes.

Command-line interface

Use the following command:

vinfra cluster network set [--traffic-types <traffic-types> | --add-traffic-types <traffic-types> |
                           --del-traffic-types <traffic-types>] <network>
--traffic-types <traffic-types>
A comma-separated list of traffic type names (overwrites network’s current traffic types)
--add-traffic-types <traffic-types>
A comma-separated list of traffic type names (adds the specified traffic types to the network)
--del-traffic-types <traffic-types>
A comma-separated list of traffic type names (removes the specified traffic types from the network)
<network>
Network ID or name

For example, to add the traffic type MyTrafficType to the MyNet network, run:

# vinfra cluster network set MyNet --add-traffic-types "MyTrafficType"

To edit a custom traffic type

Admin panel

  1. On the Infrastructure > Networks screen, click the ellipsis icon next to the traffic type name, and select Edit.
  2. In the Edit traffic type window, change the traffic type name or port, and then click Save.

Command-line interface

Use the following command:

vinfra cluster traffic-type set [--name <name>] [--port <port>] <traffic-type>
--name <name>
A new name for the traffic type
--port <port>
A new port for the traffic type
<traffic-type>
Traffic type name

For example, to rename the traffic type MyTrafficType to MyOtherTrafficType and change its port to 6901, run:

# vinfra cluster traffic-type set "MyTrafficType" --name "MyOtherTrafficType" --port 6901

To delete a custom traffic type

Admin panel

  1. Make sure it is excluded from all networks.
  2. On the Infrastructure > Networks screen, click the ellipsis icon next to the traffic type, and then select Delete.
  3. In the Delete traffic type window, confirm your action by clicking Delete.

Command-line interface

Use the following command:

vinfra cluster traffic-type delete <traffic-type>
<traffic-type>
Traffic type name

For example, to delete the custom traffic type MyOtherTrafficType, run:

# vinfra cluster traffic-type delete "MyOtherTrafficType"