Skip to main content

How tiCrypt Isolates Virtual Machines at the Network Level

· 8 min read
Thomas Samant
Thomas Samant
Senior Partner

Secure virtual machines in tiCrypt run in near-complete isolation from each other and from the surrounding environment. This isolation is the foundation of tiCrypt's security model. Every network pathway into or out of a VM is tightly controlled, authenticated, and encrypted, with no exceptions.

This post explains the mechanisms that make this possible: proxy-mediated communication, application port tunneling, VM-level network isolation, and controlled access to external licensing servers.


Key Components​

Several tiCrypt components participate in VM network security. Understanding their roles makes the rest of the post easier to follow:

  • ticrypt-connect: The application running on the user's device.
  • ticrypt-frontend: The browser-based interface, served by ticrypt-connect.
  • ticrypt-backend: The set of tiCrypt services running on the backend server.
  • ticrypt-rest: The REST-based entry point into ticrypt-backend.
  • ticrypt-proxy: Mediates communication between components by replicating traffic between two separate connections.
  • ticrypt-nft: Enforces the allow lists that control outbound access, such as access to external licensing servers. Before backend 3.16.0 this was the job of ticrypt-allowedlist.
  • ticrypt-vmc: The VM controller, responsible for all security mechanisms within the secure VM.

How VM Communication Works​

tiCrypt VMs do not accept direct connections. All ports are blocked except port 22, and even that port is not running SSH. It is controlled entirely by ticrypt-vmc for traffic tunneling. There is no mechanism to contact a secure VM through direct access.

Instead, all communication is mediated by ticrypt-proxy using the following sequence:

  1. The ticrypt-vmc maintains a persistent WebSocket connection to ticrypt-proxy.
  2. When a user wants to connect, ticrypt-frontend opens a matching WebSocket through ticrypt-proxy.
  3. ticrypt-proxy replicates traffic between the two WebSocket connections.
  4. ticrypt-vmc immediately creates a new WebSocket for future connections.
  5. Both the frontend and the VM controller exchange digital signature proofs of identity and negotiate a shared secret via Diffie-Hellman key exchange.
  6. If the digital signature fails or the user is not authorized, the connection is immediately closed. Likewise, if the VM's validation fails, ticrypt-frontend closes the connection.
  7. All subsequent messages in both directions are encrypted with the negotiated key.

After the initial handshake, all traffic is hidden from ticrypt-proxy and every other part of the infrastructure. Commands, terminal data, keystrokes — everything travels through this encrypted channel.

The only message sent in the clear is the initial authentication and key negotiation message. Any other message or operation is rejected outright.

Communication does not rely on listening on standard ports and can only be mediated by ticrypt-proxy. The VM owner's public key cannot change once learned by ticrypt-vmc, meaning that hijacking the communication would require compromising the user's private key.

Most VM functionality operates exclusively through this proxy-mediated channel. The only exception is application port tunneling.


Application Port Tunneling​

To support rich application deployment inside VMs, tiCrypt provides a generic mechanism for tunneling TCP traffic on specific ports from the VM to the user's device. The mechanism is highly controlled, but in principle it can make any network application accessible, for example, RDP over port 3389. Multiple ports are typically forwarded simultaneously to support broader functionality.

Application tunneling works similarly to SSH local port forwarding (ssh -L), but uses TLS instead of SSH. Access to VMs is limited to port 22, not SSH as a service. ticrypt-connect mediates the forwarding with ticrypt-vmc listening on port 22.

Setting Up a Tunnel​

Initiating a forwarding tunnel involves several coordinated steps:

  1. The ticrypt-frontend, using an authenticated session, tells ticrypt-rest to create a pathway to a specific VM.
  2. The request is validated and ticrypt-proxy is informed.
  3. ticrypt-proxy sets up a listening endpoint on one of the designated ports (typically 6000-6100). The endpoint is strictly scoped and only accepts connections from the IP address that made the request.
  4. ticrypt-frontend receives the allocated port.
  5. ticrypt-frontend asks ticrypt-connect to generate a TLS certificate for authentication and encryption.
  6. ticrypt-frontend tells ticrypt-vmc to accept the application forwarding and provides the TLS certificate.
  7. ticrypt-vmc replies with a list of ports that need to be tunneled.
  8. ticrypt-frontend instructs ticrypt-connect to start the connection using the certificate.
  9. Upon connection, ticrypt-vmc verifies the digital signature and initiates TLS-mediated tunneling.
  10. Traffic to and from the local port on the user's device is tunneled and recreated inside the VM, enabling application access.

A special case exists for SFTP over port 2022, if the feature is enabled in ticrypt-vmc. This can be used to transfer large amounts of data from the user's device to the VM.

The Communication Pathway​

Once established, the tunnel follows this path:

  1. ticrypt-connect accesses the allocated port controlled by ticrypt-proxy. The connection is pinned to the originating IP address.
  2. The backend forwards the connection directly to port 22 of the VM's address on the secure VM network (br-secure).
  3. The VM host switches the traffic at Layer 2 and does no forwarding or filtering of its own. In the older Linux-bridge design, the backend forwarded to a port in the range 6000-6254 on the VM host, which forwarded to port 22 of the VM.
  4. ticrypt-vmc listens on port 22 and runs the TLS protocol with port tunneling.

Port 22 is specifically chosen to prevent an SSH server from being deployed in its place. The traffic on port 22 is the TLS protocol under ticrypt-vmc control, not the SSH protocol.

The entire pathway is secured with TLS encryption and authenticated with digital signatures. At no point can any intermediate component intercept the communication without breaking TLS.


VM Network Isolation​

To ensure security, only port 22 is open inbound on secure VMs. All outbound traffic is restricted to communication with ticrypt-rest, unless an exception is granted through an allow list.

The isolation is enforced through multiple layers:

  • Internal blocking: All traffic to ports other than 22 is blocked internally by the VM itself, isolating any other access. Application access is provided exclusively through the port tunneling mechanism described above.
  • Backend firewall: The secure VM network ends at the backend, the only host that forwards or filters VM traffic. Its firewall forwards inbound connections to port 22 of a VM and to no other VM port.
  • No external routing: The VM host does not route or forward VM traffic at all. It only switches frames on the secure VM network.
  • Outbound blocking: All outbound traffic from VMs is blocked unless an allow-list entry opens it: a Global Licensing Server, or a per-VM VM access rule.

The mechanism that enables access on port 22 while blocking everything else works by preventing all traffic routing and instead providing a forwarding path on the backend from the proxy's port to port 22 of one VM's address. There is no way for a server outside the secure VM network to access any other VM port. The older Linux-bridge design provided the same path through a port range (6000-6254) on each VM host.

Outbound traffic from secure VMs is blocked because it could be used to exfiltrate data, resulting in data breaches.


Licensing Server Access​

Most commercial software requires access to external licensing servers. These servers typically reside within the organization, but occasionally they are external. tiCrypt provides a strictly controlled mechanism for enabling this access without compromising VM isolation.

From backend 3.16.0, with nft.enabled turned on, the allow lists are enforced by ticrypt-nft, and the older ticrypt-allowedlist component is no longer needed. ticrypt-nft mediates access by manipulating two things:

  • Firewall rules on the server running ticrypt-backend, held in an nftables table.
  • DNS replies to requests originating from VMs.

The mechanism is precise: unless an allow-list entry names a server and its ports, all outgoing traffic from VMs remains blocked. There are two kinds of entry. The Global Licensing Servers list opens a server to every VM. Per-VM access rules open a server only to the VMs of chosen VM configurations, always or for a limited time; see Dynamic Firewall Rules. Both are managed from ticrypt-frontend, and creating entries requires SuperAdmin privileges.


Defense in Depth​

No single mechanism secures a tiCrypt VM. Instead, multiple independent layers, proxy-mediated communication, TLS-authenticated tunneling, internal and backend firewalls, outbound traffic blocking, and controlled DNS, work together to create an environment where VMs are effectively unreachable except through authenticated, encrypted, and auditable channels. Each layer is designed so that even if one were bypassed, the remaining layers would continue to protect the VM and its data.


Related documentation: System Administration | OpenVSwitch Networking | Dynamic Firewall Rules