Security at the edge — on every plan

Most tunnel tools treat security like a premium add-on. OAuth gates, IP allowlists, and WAF rules sit behind enterprise tiers.

ngsrv does the opposite: every plan gets real edge policies (IP, geo, header auth, time windows, rate limits, WAF). You pay for scale — how many policies, tunnels, bandwidth — not for the privilege of locking a tunnel down. mTLS is Pay as you go and Enterprise only.

What you get

PlanPolicies per typemTLS
Free1 each
Pro10 each
Pay as you go10 each

Policy types: IP allowlist/blocklist, geo restrictions, header authentication, time-based access, rate limiting, and WAF.

Create a policy once in Dashboard → Security. Reference it by ID in ngsrv.yml or --policy. Reusing the same ID does not burn extra quota.

How it works

  1. Create the policy in the dashboard (pick the type that matches your threat model).
  2. Copy the policy ID (e.g. ngsrv_ips_ABC123).
  3. Attach it to a tunnel:
ngsrv http 3000 --policy ngsrv_ips_ABC123

Or in config:

port: 3000
subdomain: api
security_policies:
  - ngsrv_ips_ABC123
  - ngsrv_rate_webhooks

Policies enforce at the edge before traffic hits your laptop. Your app stays dumb; the tunnel carries the guardrails.

Why this matters

  • Webhooks: Stripe and GitHub hit a public URL. IP allowlist + header auth stops random scanners without touching your handler.
  • Client previews: Header auth or IP allowlist so only your client reaches the demo.
  • APIs in dev: Rate limits catch runaway scripts before they flatten your local DB.

Deep dives

Full reference: docs security index.