Prynt Gate docs

Agent and bouncer

One small agent per host: it tails your logs, sends events in batches, and applies the block decisions to the host firewall.

Install

The console (Gate → Sensors) shows the exact command for each sensor, with its install URL and token:

# Console → Gate → Sensors → New sensor shows this command with your token
curl -fsSL https://api.pryntid.com/v1/gate/agent/install.sh | sudo sh -s -- \
  --token gk_live_YOUR_SENSOR_TOKEN \
  --parser traccar:/opt/traccar/logs/tracker-server.log \
  --parser sshd:journal:ssh.service \
  --bouncer nftables            # dry-run until you pass --enforce

It installs the agent as a systemd service, detects nftables or ufw, and starts in dry-run. Or run it as a container (host network and NET_ADMIN are needed only to enforce blocks):

# Logs only (no firewall changes, unprivileged): configuration in /etc/prynt-gate/agent.json
docker run -d --name prynt-gate --restart unless-stopped \
  -v /etc/prynt-gate:/etc/prynt-gate:ro -v prynt-gate-state:/var/lib/prynt-gate \
  -v /var/log:/host/log:ro  prynt-gate-agent

# With the nftables bouncer: host network namespace and only CAP_NET_ADMIN
docker run -d --name prynt-gate --restart unless-stopped --network host --cap-drop ALL --cap-add NET_ADMIN \
  --user 0 -v /etc/prynt-gate:/etc/prynt-gate:ro -v prynt-gate-state:/var/lib/prynt-gate \
  -v /var/log:/host/log:ro  prynt-gate-agent

Configuration lives in /etc/prynt-gate/agent.json (the install script writes it from its flags); the token is kept in /etc/prynt-gate/token with mode 0600:

{
  "apiBase": "https://api.pryntid.com",
  "tokenFile": "/etc/prynt-gate/token",
  "sources": [
    {"parser": "traccar", "path": "/opt/traccar/logs/tracker-server.log"},
    {"parser": "sshd", "journal": {"unit": "ssh.service"}},
    {"parser": "fail2ban", "path": "/var/log/fail2ban.log"}
  ],
  "bouncer": {
    "enabled": true,
    "backend": "nftables",
    "dryRun": true,
    "allowlist": ["203.0.113.10/32"],
    "useDefaultAllowlist": true
  }
}

Try a parser on a file without sending anything:

prynt-gate parse --parser traccar /opt/traccar/logs/tracker-server.log   # prints events, sends nothing

What it does

  1. Tails the log files you enable and turns each relevant line into an event with one of the parsers.
  2. Sends batches to POST /v1/gate/events; if the API cannot be reached it keeps them in a local spool and retries.
  3. Every 30 seconds reads GET /v1/gate/blocks and reconciles the firewall with the full list of active blocks.
  4. Reports a heartbeat, so Gate → Sensors shows it online with its version, mode and applied blocks.

The bouncer

  • nftables: one atomic transaction rebuilds the table inet prynt_gate, with IPv4 and IPv6 sets whose elements carry the block's timeout, so a block expires even if the agent stops.
  • ufw: deny from <ip> rules tagged with a comment; the agent removes them when the block expires or is revoked.
  • Allowlist: the account's and the sensor's allowlists from the API plus a local one. Allowlisted addresses, private, loopback and CGNAT ranges, the host's own addresses and the API's are never blocked, whatever the API says.
  • Dry-run: logs what it would add or remove without touching the firewall. Pass --enforce at install (or "dryRun": false) to apply blocks; the console can also put a sensor back in dry-run.

Behind a router that rewrites source addresses (SNAT), every connection can look like it comes from the router. Check that your logs show real public IPs and allowlist the router, or every block would hit your own gateway.

Next: Log sources

Updated 2026-11-15 · API reference