Skip to content

Create a VPN interface

Request

inDefaultRoute and outDefaultRoute are mutually exclusive — set at most one to true.

Inside NATs (insideNats) rewrite traffic arriving from the VPN before it enters the local network. Outside NATs (outsideNats) rewrite traffic leaving the local network before it enters the VPN.

After creating or updating a VPN interface, push the node config for the change to take effect.

Security
JWTAuthorizer
Path
nodeIDstringrequired

Node ID

networkNamestringrequired

Network name

Bodyapplication/json
inDefaultRouteboolean
insideNatsArray of objects
interfaceNamestring
outDefaultRouteboolean
outsideNatsArray of objects

NAT rules for traffic leaving the VPN network (outbound). Maps VPN-side CIDRs to local node CIDRs.

curl -i -X POST \
  'https://apidocs.trustgrid.io/_mock/v2/node/{nodeID}/vpn/{networkName}/interface' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "inDefaultRoute": true,
    "insideNats": [
      {
        "description": "string",
        "localCidr": "string",
        "networkCidr": "string"
      }
    ],
    "interfaceName": "string",
    "outDefaultRoute": true,
    "outsideNats": [
      {
        "description": "string",
        "localCidr": "string",
        "networkCidr": "string",
        "networkGroup": "string",
        "proxyArp": true
      }
    ]
  }'

Responses

OK

Response
No content