intentic
Create your workspace
Connected systems

VPN

Corporate tunnels the sandbox can hold open

On this page(4 sections)

What is configured, dialling and dropping one, and reading connections out of an exported client configuration. Link state is read back from the operating system, not from memory.

GET/vpnConfigured tunnels and which are up

Every stored VPN with its live link state, read back from the operating system rather than from memory, so a tunnel dropped from a shell and one dropped from a screen look the same here.

What you send

Nothing. Call it as it is.

What comes back

FieldType
linksEvery configured tunnel with its live…object[]
idWhich tunnelstring
providerWhat kind of tunnel it is"wireguard" | "fortinet" | "ipsec"
stateWhether it is up, dialling, resting,…"connected" | "connecting" | "disconnected" | "unavailable" … (5)
gatewayWhat it dialsstring
interfaceThe network interface carrying it, once…string
addressThe address the far end gave…string
routesWhat goes through itstring[]
dnsName servers it pushed, when it…string[]
sinceWhen it came up, in millisecondsnumber
autoConnectWhether it dials itself when the…boolean
detailWhy it failed, or a note…string
Try itanswered in this tab
curl
curl "$SANDBOX/vpn" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.vpn.list();
POST/vpn/{id}/connectDial a VPNstream

Brings a stored tunnel up, streaming the client's progress as it authenticates and then sets up routing. Streamed because a dial takes seconds and can fail with something you have to read: a wrong password, a gateway certificate nobody trusts, a code it wants. Connecting one that is already up simply says so.

What you send

FieldTypeWhere
idrequiredWhich tunnel to dialstringaddress
otpA one-time code, where the gateway…stringbody

What comes back

FieldType
when event is "message"shape
dataobject
kindstring
idstring
retrynumber
when event is "done"shape
dataunknown
idstring
retrynumber
when event is "error"shape
dataunknown
idstring
retrynumber
Try itanswered in this tab
curl
curl -N -X POST "$SANDBOX/vpn/a1b2c3d4/connect" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"otp":"…"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.vpn.connect({
  "id": "a1b2c3d4",
  "otp": ""
});
POST/vpn/{id}/disconnectDrop a tunnel

Takes the tunnel down. One that was already down is fine: the promise is that it is not up afterwards.

What you send

FieldTypeWhere
idrequiredWhich tunnelstringaddress

What comes back

FieldType
okAlways truetrue
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/vpn/a1b2c3d4/disconnect" \
  -H "x-intentic-control: $INTENTIC_TOKEN"
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.vpn.disconnect({
  "id": "a1b2c3d4"
});
POST/vpn/import-forticlientRead connections out of an exported config

Turns an exported FortiClient configuration into a list of connections you can add, so somebody holding that file picks from a list instead of retyping a host and port for every tunnel.

What you send

FieldTypeWhere
xmlrequiredThe exported configuration file, wholestringbody

What comes back

FieldType
connectionsThe connections found in the file,…object[]
idThe id it would be added…string
labelIts name as the file has…string
providerWhat kind of tunnel it is"wireguard" | "fortinet" | "ipsec"
serverWhere it dialsstring
portOn which portnumber
usernameThe username, but only when the…string
descriptionWhatever the file said about itstring
localIdAn identity some tunnel types need,…string
aggressiveWhich negotiation mode it usedboolean
pfsWhether it asked for forward secrecyboolean
dhGroupWhich key-exchange group it usedstring
needsWhat you still have to type…string[]
Try itanswered in this tab
curl
curl -X POST "$SANDBOX/vpn/import-forticlient" \
  -H "x-intentic-control: $INTENTIC_TOKEN" \
  -H "content-type: application/json" \
  -d '{"xml":"…"}'
TypeScript
import { sandbox } from "@intentic/sandbox-client";

const result = await sandbox.vpn.importForticlient({
  "xml": ""
});

Type to search every page, in the docs and the API reference.