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:
- Enter Templates → VM configurations → select a configuration → menu → Edit.
- In the Limits section, press Edit.
- In the Port restrictions subsection, press Add.
- Specify the restriction settings:
-
- Traffic direction — the type of connection: incoming or outgoing.
- Port numbers.
- To add a setting, press Add more.
- Press Save.
Example of setup
Restricting access to a VM
To restrict access to a particular VM, edit its fine-tuning settings:
- Enter Virtual machines → select the VM → menu → VM parameters → Fine-tuning settings.
- In the Port restrictions subsection, press Add.
- Specify the restriction settings:
-
- Traffic direction — the type of connection: incoming or outgoing.
- Port numbers.
- To add a setting, press Add more.
- Press Edit.
To restrict access to a VM group:
- Enter Virtual machines → check the required VMs in the column.
- On the bottom line of the table, press more... → Change port restrictions.
- Specify the restriction settings:
- Traffic direction — the type of connection: incoming or outgoing.
- Port numbers.
- To add a setting, press Add more.
- Press Add.