Connection Errors
"Connection refused"
Symptom: NAT reports Connection refused when trying to reach the target API.
Solutions:
- Verify the API is running:
curl -I https://api.example.com - Check the URL — ensure there's no trailing path that's part of the endpoint, not the base URL
- Confirm the port is correct (HTTPS default: 443, HTTP default: 80)
- Check firewall rules on the API server
"Connection timed out"
Symptom: Requests time out after the default timeout period.
Solutions:
- Increase the timeout:
nat scan --url ... --timeout 60 - Reduce concurrency to avoid overwhelming the server:
--concurrency 2 - Check whether the API server is under load
- Verify network path — especially relevant if scanning across VPN or from CI runners
"SSL certificate verification failed"
Symptom: SSL: CERTIFICATE_VERIFY_FAILED or similar TLS error.
Common causes:
- Self-signed certificate in staging environment
- Certificate expired
- Certificate hostname mismatch
Solutions:
- For staging with a self-signed cert (development only):
nat scan --url https://staging.example.com --no-tls-verify⚠️Never use
--no-tls-verifyagainst production. This disables TLS verification and exposes your credentials to MITM attacks. - For an internal CA: provide the CA bundle:
nat scan --url https://api.example.com --ca-bundle /path/to/internal-ca.pem - For expired certificates: renew the certificate on the API server
"DNS resolution failed"
Symptom: NAT cannot resolve the API hostname.
Solutions:
- Check DNS from the machine running NAT:
nslookup api.example.com - If scanning from a CI runner, confirm the runner has access to your internal DNS
- Try using the IP address directly with a
Hostheader override (not recommended for production)
"HTTP 502 / 503 / 504" responses
Symptom: NAT receives gateway or service unavailable errors.
Why this happens: These errors come from a load balancer or reverse proxy in front of your API, indicating the upstream service is unhealthy or overloaded.
Solutions:
- Check that the API service is healthy before scanning
- Reduce scan concurrency:
--concurrency 2 --rate-limit 5 - Schedule scans during low-traffic periods
NAT can't reach the API from CI
Symptom: Scan works locally but fails in CI with connection errors.
Common causes and solutions:
| Cause | Solution |
|---|---|
| CI runner is on a different network | Deploy to a staging URL accessible from the CI runner's network |
| Firewall blocks CI runner IPs | Allowlist your CI provider's IP ranges on the staging firewall |
| VPN required | Configure the CI workflow to connect to VPN before scanning |
| Staging isn't deployed yet | Trigger the scan only after successful deployment |
"Too many redirects"
Symptom: NAT follows redirects until hitting a limit.
Solutions:
- Check whether your
--urlpoints to the correct final URL (after all redirects) - Provide the final URL directly to avoid redirect chains
- If HTTP-to-HTTPS redirect, use
https://in your--url
Rate limiting from the target API
Symptom: NAT receives 429 Too Many Requests during scanning.
Solutions:
- Add rate limiting:
nat scan --url ... --rate-limit 5 - Reduce concurrency:
--concurrency 2 - Add delays:
--request-delay 500(milliseconds between requests) - Check if your staging API has stricter rate limits than production and adjust accordingly
Proxy support
If your environment requires an HTTP proxy to reach external APIs:
export HTTPS_PROXY=http://proxy.example.com:8080
export HTTP_PROXY=http://proxy.example.com:8080
nat scan --url https://api.example.comNAT respects standard HTTP_PROXY and HTTPS_PROXY environment variables.
Next steps
- Common Issues — general troubleshooting
- CI/CD Issues — CI-specific connection problems
- Docker Issues — Docker networking issues