You can restrict connections to certain ports of a virtual machine (VM). To apply restrictions, the platform will block ports in the firewall settings on the cluster node. Blocking is applied simultaneously to both TCP and UDP traffic. Rules for incoming traffic apply to the destination port and for outgoing traffic — to the source port.

Note

You can only restrict connections for VMs on cluster nodes running AlmaLinux 8 and Ubuntu 20.04.

Creating a VM with restricted access


For the platform to create a VM with restricted access, edit the VM configuration:

  1. Enter TemplatesVM configurations → select a configuration →  menu → Edit.
  2. In the Limits section, press Edit.
  3. In the Port restrictions subsection, press Add.
  4. Specify the restriction settings:
    1. Traffic direction — the type of connection: incoming or outgoing.
    2. Port numbers.
    3. To add a setting, press Add more.
  5. Press Save.

Example of setup

Restricting access to a VM


To restrict access to a particular VM, edit its fine-tuning settings:

  1. Enter Virtual machines → select the VM →  menu → VM parametersFine-tuning settings.
  2. In the Port restrictions subsection, press Add.
  3. Specify the restriction settings:
    1. Traffic direction — the type of connection: incoming or outgoing.
    2. Port numbers.
    3. To add a setting, press Add more.
  4. Press Edit.

To restrict access to a VM group:

  1. Enter Virtual machines → check the required VMs in the  column.
  2. On the bottom line of the table, press more...Change port restrictions.
  3. Specify the restriction settings:
    1. Traffic direction — the type of connection: incoming or outgoing.
    2. Port numbers.
    3. To add a setting, press Add more.
  4. Press Add.