Features

Automatic port forwarding

Linux guests' listening TCP and UDP ports are discovered and published on your Mac's loopback without being declared in advance, and a collision is reported rather than silently taken.

Why it matters

The usual way to reach a service in a guest is to know its port before it exists: declare a forward, restart the machine, discover the port moved. Automatic discovery inverts that — the guest starts listening, the forward appears, and if something on the Mac already owns the port you are told rather than left with a socket that silently belongs to the wrong process.

What changes

Without it

  • Declare each forward by hand as `protocol:hostPort:guestPort` before you need it.
  • A port that changes inside the guest means editing the machine and restarting.
  • A clash with something already on the Mac is discovered by the thing that breaks.

With 1VMTool

  • Ports the guest is listening on are discovered and published on loopback automatically.
  • A Ports tab per machine, and `1vm ports <vm>` for scripts.
  • Collisions are arbitrated by kernel bind ownership and reported — a forward never replaces an existing socket.

How it works

  1. The guest reports what it is listening on

    Updated Linux guest tools enumerate listening TCP and UDP ports, on both the Apple engine and the first-party 1VM engine.

  2. The Mac publishes them on loopback

    Discovered ports are published on 127.0.0.1 by default, so a service in the guest is reachable from the Mac and nowhere else until you say otherwise.

  3. Collisions are stated, not resolved

    Ownership of a host port is decided by the kernel's bind. If something already holds it, the Ports tab reports the collision instead of stealing the socket.

  4. LAN exposure is a deliberate choice

    Publishing beyond loopback is per-machine and off by default; the defaults for new Linux machines live in Settings → Resources, or `1vm config-global`.

What it covers

  • Automatic TCP and UDP discovery for Linux guests on both engines
  • A Ports tab per machine listing what is published right now
  • `1vm ports <vm>` for scripts and CI
  • Explicit forwards still work — `1vm set <vm> portForwards.add tcp:8080:80`
  • Collision reporting instead of silent socket replacement
  • Optional LAN exposure, off by default
  • Library-wide defaults in Settings → Resources and `1vm config-global`

What you get out of it

  • Reach a service in a guest without knowing its port in advance
  • No restart to add a forward for something that just started listening
  • A clash tells you it is a clash, at the moment it happens

Try it on your own Mac

Every screen states its limits before you commit to anything.