How to protect a tunnel with time-based access
Time-based policies open or close your tunnel on a schedule — useful when a preview should only work during standup hours or when you auto-lock admin routes overnight.
Free plan: 1 time-based policy. Pro / PAYG: 10.
Step 1 — Create the policy
- Visit Dashboard → Security → Time-Based Access.
- Define allowed days and time ranges (timezone-aware).
- Copy
ngsrv_time_….
Step 2 — Attach to a tunnel
ngsrv http 3000 --policy ngsrv_time_business_hours
port: 3000
security_policies:
- ngsrv_time_business_hours
- ngsrv_ips_office
Stack policies: requests must pass all attached policies.
Example
Mon–Fri 09:00–18:00 America/New_York for a client demo tunnel. Outside the window, edge returns 403 — your local server can stay running.
More: Time-based docs