Overview
A tunnel lets actions in one workspace reach hosts on a private network without opening inbound firewall ports. Tracecat uses Pangolin:- A site connector (Newt) runs inside your network and opens an outbound tunnel to the Pangolin server.
- Pangolin grants the tunnel’s machine client access to each allowed target, on its listed TCP ports only. UDP and ICMP are off.
- A tunnel gateway runs the machine client and forwards action traffic. It accepts only short-lived tokens for its own tunnel and workspace, connects only to the tunnel’s allowed targets, and logs every connection.
Requirements
- The
tunnelsEnterprise entitlement. tunnel:readto list tunnels and check status, andtunnel:create,tunnel:update, ortunnel:deleteto manage them. Workspace admins and organization owners and admins hold all four; workspace viewers holdtunnel:read.- A Pangolin server: Pangolin Cloud for Tracecat Cloud, or your own Pangolin deployment for self-hosted Tracecat. See Configure Pangolin for self-hosted Tracecat.
workspace_id as a query parameter on every request.
Create a managed tunnel
1
Create the tunnel
List every private host the workspace may reach, with its exact TCP ports:
host is an exact hostname or IP address; wildcards and CIDR ranges are rejected. Each target takes 1 to 64 unique ports, and a tunnel takes up to 100 targets.Tracecat creates a Pangolin site, one machine client for the tunnel, and one private resource per target granted only to that client. If any step fails, Tracecat deletes what it created and returns 502.2
Save the site credentials
The Store
201 response returns the site credentials once:site_secret in your secrets manager. Tracecat does not return it again.3
Install the site connector
Run the connector on a host inside your network that can reach every target:To run the binary directly, use
site_install_command. The connector needs outbound access to the Pangolin endpoint only.4
Check the site status
site_online turns true once the connector connects.Bring your own Pangolin
If you already run Pangolin and manage the site, resources, and access yourself, create a machine client in Pangolin, grant it only the resources Tracecat needs, and register it:endpoint must use https. Tracecat encrypts client_secret and never returns it. Keep allowed_targets in step with the Pangolin resources; Tracecat enforces both, so a port must appear in each.
Run the tunnel gateway
Each tunnel has one gateway. It needs the tunnel’s gateway key, which signs the tokens actions present:NET_ADMIN and /dev/net/tun, so run gateways apart from executors and allow only executors to reach them.
The gateway loads the tunnel’s workspace and allowed targets from the Tracecat API with its gateway key, and refreshes them every 15 seconds. Within one refresh of you disabling or deleting the tunnel, issuing a new gateway key, or removing a target, the gateway rejects new requests and closes the affected open connections. After a key rotation, restart the gateway with the new key. If the gateway can’t reach the API for 60 seconds, it stops accepting requests until the API is back.
The gateway answers
407 for a missing, expired, or wrong-tunnel token, 403 for a host or port outside the allowed targets or a revoked tunnel, 503 while it can’t load the tunnel’s policy, and 504 when Pangolin does not reach the target. It never falls back to direct egress.
Use TLS with private services
HTTPS through a tunnel stays encrypted end to end. The gateway relays the TLS connection without decrypting it, and the action verifies the server certificate against the hostname in the URL, such assplunk.internal. Issue the certificate for the hostname you list in allowed_targets.
If an internal CA signs the certificate, add the CA to the workspace:
1
Create a CA certificate credential
In the workspace, open Credentials and select Add credential. Name the secret 
ca_cert, set Type to CA certificate, paste the PEM-encoded CA certificate, and select Create secret. Tracecat stores it as the CA_CERTIFICATE key.
2
Keep certificate verification on
core.http_request, core.http_poll, and core.http_paginate load the ca_cert credential automatically. Leave verify_ssl set to true; requests then fail if the certificate does not chain to your CA or does not match the hostname.mtls with the mTLS certificate + key type. See Secrets for every credential type.
Plain http:// requests are encrypted inside the Pangolin tunnel, but not between the site connector and the target, and the gateway can read them. Prefer https:// for anything that carries credentials.
Manage tunnels
- List tunnels with
GET /tunnelsand read one withGET /tunnels/{tunnel_id}. - Rename, describe, or disable a tunnel with
PATCH /tunnels/{tunnel_id}. Managed tunnels reject changes toendpoint,client_id,client_secret, andallowed_targets; create a new managed tunnel to change targets. - Delete a tunnel with
DELETE /tunnels/{tunnel_id}. For managed tunnels, Tracecat deletes the Pangolin resources, machine client, and site first. If Pangolin cleanup fails, the request returns502and keeps the tunnel so you can retry. Stop the site connector afterwards.
Configure Pangolin for self-hosted Tracecat
Tracecat Cloud manages Pangolin for you, so this section applies only to self-hosted Tracecat. Managed tunnels provision Pangolin through its Integration API.1
Enable the Integration API
Deploy Pangolin separately and enable its Integration API. The API base URL ends in
/v1.2
Create an organization API key
In the Pangolin dashboard, open your organization’s API keys and create a key with these permissions:
- Sites: pick site defaults, create, get, and delete.
- Clients: pick client defaults, create, get, and delete.
- Private resources: create, get, delete, and list resource clients.
3
Set the Tracecat environment variables
Set these on the Managed tunnels stay off until all four are set. See Environment variables.
api service and restart it:Related pages
- See HTTP for calling private services with
core.http_request. - See Python UDFs for keeping custom actions compatible with tunnels.
- See Roles and permissions for which built-in roles hold the
tunnel:*scopes.