Is Your AI Agent Exposed to the Internet? How to Check in 5 Minutes
Description and use
By following the five‑minute checklist, users can quickly determine if their OpenClaw Gateway is exposed, identify the cause, and remediate the exposure by tightening bind settings, firewall rules, and credential rotation.
Problem
OpenClaw agents may unintentionally expose their control gateway to the public internet, allowing unauthorized access to dashboards and agent control.
Outcome
By following the five‑minute checklist, users can quickly determine if their OpenClaw Gateway is exposed, identify the cause, and remediate the exposure by tightening bind settings, firewall rules, and credential rotation.
Workflow
- 1. Run
openclaw security audit --deepon the server and check for critical findings such asgateway.bind_no_auth,gateway.tailscale_funnel,gateway.control_ui.allowed_origins_required,browser.control_no_auth, orgateway.token_placeholder_value. 2. Executelsof -i :18789to see which address the port is bound to;127.0.0.1orlocalhostindicates local only, while*or0.0.0.0indicates public exposure. 3. Verify the bind setting withopenclaw config get gateway.bind; it should beloopbackunless a specific network setup is required. 4. From a different network, runnmap -sT -p 1-65535 <public-ip> --opento scan for open ports on the server’s public IP. 5. Check cloud firewall or security group rules for inbound rules on port 18789 from0.0.0.0/0and remove them if present. 6. If exposure is detected, close the Gateway: stop the service, setgateway.bindtoloopback, and remove any public routes, Docker port publishes, reverse proxy configurations, or Tailscale Funnel. 7. Rotate credentials: generate a new Gateway token withopenclaw doctor --generate-gateway-tokenand rotate remote client secrets and provider keys. 8. Freeze risky access by disabling or restricting DMs and groups, and removing any wildcard allow entries. 9. Review logs withopenclaw logsand recent configuration changes for unexpected activity. 10. Re‑runopenclaw security audit --deepand perform an external scan again to confirm the issue is resolved.
Evidence
OpenClaw's Gateway serves the Control UI and the agent's control connection on one port, 18789 by default.
Run openclaw security audit --deep on the server and check for critical findings such as gateway.bind_no_auth, gateway.tailscale_funnel, gateway.control_ui.allowed_origins_required, browser.control_no_auth, or gateway.token_placeholder_value.
From a different network, run nmap -sT -p 1-65535 <public-ip> --open to scan for open ports on the server’s public IP.
If exposure is detected, close the Gateway: stop the service, set gateway.bind to loopback, and remove any public routes, Docker port publishes, reverse proxy configurations, or Tailscale Funnel.
- Record date: 2026-10-21T09:41:23.382Z