VM

Public IPv6

Public IPv6 gives a supported Linux VM its own address for native TCP services such as PostgreSQL, Redis or SSH. It is off by default. The VM owner chooses which ports are public; no ports open automatically.

Configure in the dashboard

Open Network → Firewall and add a port such as 443 or an inclusive range such as 8000-8100. New rules start with Private (linked VMs) and Oblien Edge (gateway traffic) checked. On a host that links these sources, the Edge check follows Private. Select Public TCP explicitly for direct IPv6. Enable IPv6 in Network → Public IPv6, then use Save Changes in the Network tab. Use Discard to undo pending edits.

Allow all public TCP ports requires confirmation because it exposes all listening TCP services, including future services. Runtime ports 9990 and 9999 remain blocked. Copy the assigned address after saving. With no public ports, ranges or allow-all policy, incoming TCP remains blocked.

The section reports the current access state. An enabled setting can be inactive because the VM is stopped, its traffic quota is exhausted, compute authorization has expired, or no ports are open. Active means the firewall permits access; your application must still listen on the selected port.

Only the owner can enable IPv6 or change Edge or public exposure on a split firewall. Delegated network editors can maintain private rules. When another request changes the policy, the dashboard loads the latest settings for review rather than resubmitting the old change.

Configure with the SDK

The examples below require the oblien SDK 3.3.0 or later. The SDK supplies the versioned API base URL.

import Oblien from 'oblien';

const client = new Oblien({
  clientId: process.env.OBLIEN_CLIENT_ID!,
  clientSecret: process.env.OBLIEN_CLIENT_SECRET!,
});
const vm = client.vm(vmId);
const previous = await vm.network.getFirewall();
const firewall = await vm.network.setFirewall({
  expected_revision: previous.revision,
  private_ports: previous.private_ports,
  public_tcp_ports: [5432],
});
const state = await vm.network.setPublicIPv6({
  enabled: true,
  expected_revision: firewall.revision,
});
console.log(state.address, state.active);

The same methods are available as client.vms.network.getPublicIPv6(vmId) and client.vms.network.setPublicIPv6(vmId, settings). See the API contract and CLI commands.

Connect to the service

Bind the application to its IPv6 address or [::] on the allowed port. Clients need IPv6 connectivity. Use the service's normal authentication and TLS. For an HTTP service on port 8080, the address syntax is:

curl -6 'http://[2001:db8:1::abcd]:8080/'

Replace the documentation address with the assigned address and allow port 8080 first. For hostnames, create an AAAA record. Arbitrary TCP requires DNS-only mode rather than a standard Cloudflare HTTP proxy.

Direct SSH on port 22 is optional and uses guest credentials. The existing [email protected] gateway works independently, including for clients without IPv6. Opening a VM port does not expose that port on the physical host.

Limits and lifecycle

  • Incoming TCP and its replies are supported. Guest-initiated IPv6 connections and UDP services are blocked.
  • Choose up to 50 individual ports or inclusive ranges per exposure, within 1–65535. Public rules exclude runtime ports 9990 and 9999. The host firewall applies the rules for each source. The private allow-all option never opens public ports.
  • IPv4 and IPv6 use the VM's existing traffic totals, bandwidth limits and sampled data quotas.
  • The address stays reserved across disable/enable and stop/start on the same host. Native TCP cannot wake a stopped VM.
  • Moving to a different host requires disabling IPv6, then enabling it on the destination. The address changes; update DNS afterward.
  • Disabling access or removing a port also blocks traffic on established connections. Clients may time out rather than receive an immediate disconnect message.

If a request fails, inspect the current state before retrying: settings can be saved while activation is incomplete. A conflict response requires reading the latest revision. Neither clients nor the dashboard choose the address or access deadline.

Hetzner and host firewall configuration are provider responsibilities. Operators can use the host setup guide.

The central firewall methods are getFirewall() and setFirewall({ expected_revision, private_ports, public_tcp_ports }). The SDK exports FirewallState and FirewallUpdateParams. The private and public port lists are required on a firewall update. On a split-capable v2 host, use the optional edge_port_ranges field to change gateway access independently. Empty lists deny access; private_ports: [-2] permits all private ports only. Public rules support inclusive public_tcp_port_ranges and the separately confirmed public_tcp_allow_all option. Omitted additive fields preserve existing policy; empty arrays or false clear it. Firewall updates and IPv6 activation share one revision, so read again after either changes. Enabling or disabling IPv6 without tcp_ports preserves the saved rules. Removing a public port also revokes established connections to it.

V2 firewall defaults and write limits

A v2 firewall read includes default_rule_exposure. A new rule with no exposure selects Private and Oblien Edge. Each selected source still needs an authorized link or gateway path. Direct Public TCP requires an explicit grant. Use setFirewall with the current revision to remove access from an existing rule.

Each node admits 60 network-policy writes per owner and namespace in a rolling minute. VMs without a native namespace share their owner's budget. Eight extra writes per minute are reserved for changes that only reduce access. A full tenant budget returns HTTP 429 (firewall_write_limited). A saturated host returns HTTP 503 (firewall_node_busy). Wait for the Retry-After delay in seconds, then read the current revision before submitting another change. SDK 4 exposes the delay as error.retryAfter.

Rotate an address

Rotation requires SDK 3.3.0 and a provider-enabled node. In the dashboard, select Network → Public IPv6 → Rotate address and confirm. The current address is permanently retired. Existing connections to that address stop working; update DNS AAAA records and external allowlists. The VM keeps running, and its firewall, private IP and traffic quotas stay unchanged. A disabled public interface stays disabled.

Read state.rotation for provider support, available, the effective policy, remaining VM/account allowances and next_allowed_at. Current defaults are a one-hour cooldown, three rotations per VM per rolling 24 hours, and 20 per account per node per rolling 24 hours. The account cap is per node, not a global cap across the fleet. Clients cannot override these limits or choose an address. Missing rotation metadata means the node does not expose this feature.

const network = client.vm(vmId).network;
const current = await network.getPublicIPv6();
if (!current.rotation?.available) throw new Error('Rotation is not currently available');
const request = {
  expected_revision: current.revision,
  request_id: crypto.randomUUID(),
};
// Persist this exact request before sending it. Keep it after an uncertain error.
const result = await network.rotatePublicIPv6(request);
console.log(result.operation.status, result.operation.address, result.state);

request_id must be a lowercase UUID v4. Reuse both the same request ID and original expected revision after a timeout, connection loss or pending response. A retry returns that operation's original receipt plus the VM's current state; it does not rotate again or consume another allowance. The current state can be newer than the receipt if another rotation has since completed. Do not generate a fresh ID to resolve an uncertain result.

A pending receipt means the allocation has committed and recovery is finishing the guest/host network changes. Poll getPublicIPv6() or retry the identical request. The old address remains blocked. completed confirms the address change; use state.active separately to check current access, which can still be off because of firewall, billing, quota or VM state. Recovery does not restart the VM.

A new request with a stale shared firewall revision receives 409 (public_ipv6_revision_conflict). Reusing an ID with different scope or revision receives 409 (public_ipv6_rotation_conflict). Competing pending operations return 409 (public_ipv6_rotation_pending). Limits return 429 (public_ipv6_rotation_limited); read the authoritative next allowed time. Disabled/unsupported rotation returns 409 (public_ipv6_rotation_unavailable). None of these errors authorizes automatically starting a different rotation. Namespace or host moves must wait for a pending rotation to finish.

REST: POST /v1/vms/{vmId}/network/ipv6/rotate, also available under /v2. The SDK keeps its /v1 default. Both use the same owner/scope checks and native operation. Exported types are PublicIPv6RotationParams, PublicIPv6RotationReceipt, PublicIPv6RotationStatus and PublicIPv6RotationResult.

oblien network ipv6-rotate <vm-id> --expected-revision 4 \
  --request-id cdf0142c-04fc-4d18-8001-03ddda1db2d2 --json

MCP tool vm_public_ipv6_rotate takes expected_revision and request_id, plus vm_id in the SDK MCP server or vmId in remote MCP. It is owner-only, destructive to old TCP connections and idempotent for an identical request. Fetch detailed tool documentation before use; the short discovery description is not a separate mutation path.