# Fix: your gateway is on 0.0.0.0

Find agent services listening on all interfaces and bind them to localhost.

Check: network exposure. Controls: ASI03, MCP07. Critical when auth is off.

## Detect

```bash
# macOS
lsof -nP -iTCP -sTCP:LISTEN | grep -E '\*:|0\.0\.0\.0:|\[::\]:'
# Linux
ss -ltnp | grep -E '0\.0\.0\.0:|\*:|\[::\]:'
```

Look for port 18789 (OpenClaw gateway) and any MCP server port. `127.0.0.1` is safe. `0.0.0.0`, `*` and `[::]` are not.

## Fix

```bash
sma fix gateway-bind
```

Manual route: set the gateway host to `127.0.0.1` in its config, restart, and run the detect command again.

Block the port at the firewall as a second layer:

```bash
# Linux (ufw)
sudo ufw deny 18789/tcp
# macOS: System Settings > Network > Firewall, block incoming for the runtime
```

## Verify

```bash
curl -sS -m 5 -o /dev/null -w '%{http_code}\n' http://YOUR_PUBLIC_IP:18789/
```

Expect a timeout or connection refused. Then run `npx -y securemyagent checkup`.

## Remote access

Use an SSH tunnel, not an open port:

```bash
ssh -N -L 18789:127.0.0.1:18789 user@your-host
```

Background: [Exposed gateways and CVE-2026-25253](https://securemyagent.ai/articles/exposed-gateways-cve-2026-25253).

## Sources

- [clawdocs known vulnerabilities](https://clawdocs.org/security/known-vulnerabilities)
- [OWASP Top 10 for Agentic Applications 2026](https://genai.owasp.org/2025/12/09/owasp-top-10-for-agentic-applications/)
- [OWASP MCP Top 10](https://owasp.org/projects/mcp-top-10)
