gray-elephant-45673
03/06/2026, 3:39 PMtall-airline-16756
03/06/2026, 3:39 PMtall-airline-16756
03/06/2026, 3:39 PMgray-elephant-45673
03/06/2026, 3:41 PMtall-airline-16756
03/06/2026, 3:41 PMgray-elephant-45673
03/06/2026, 3:42 PMtall-airline-16756
03/06/2026, 3:42 PM<https://api.example.com>, `https://internal.example.org:8443`).
◦ If you don’t have code access, inspect the WAF logs for the blocked requests’ Host header or the request URL path — the Host header shows the hostname the agent targeted.
1. Create a WAF rule that allows requests targeting that hostname
◦ Configure the WAF to allow inbound requests where the Host header equals your backend domain (exact match or wildcard as appropriate).
◦ If your WAF supports SNI inspection, allow by SNI hostname for TLS (this matches the TLS handshake hostname).
◦ If your WAF ruleset requires an IP target, combine hostname-based allowlisting with DNS resolution (see considerations below).
1. Restrict who can reach that hostname
◦ Scope the rule so it only applies to the specific API paths the agent calls (e.g., /api/agents/*) and specific HTTP methods if possible.
◦ Require strong authentication (mutual TLS, bearer token, signed requests) so allowing the hostname does not open the endpoint to abuse.
1. Test and monitor
◦ Temporarily enable the hostname rule and repeat the API calls from the agent.
◦ Confirm in WAF logs that the traffic is now allowed and that the Host/SNI matches your rule.
How to identify the exact hostname if you’re unsure
• Check your agent’s configuration or environment variables for API_BASE, BACKEND_URL, or similar keys.
• Inspect recent blocked request entries in the WAF log:
◦ Look for the Host header or the full request URL shown in the log entry.
◦ For TLS connections, check the SNI value captured by the WAF (if available) — SNI is the hostname presented during TLS handshake.
• If you can capture a sample request (timestamp, redacted path), share the Host header or SNI and I’ll confirm the exact string to allow.
Practical considerations and common pitfalls
• DNS and load balancers: If your backend uses a load balancer or CDN, allow the public hostname (the one clients call). Don’t try to allow an internal IP unless you control the egress and source IPs.
• Wildcards: Use wildcards carefully. Allow <http://api.example.com|api.example.com> rather than *.<http://example.com|example.com> unless you need broader coverage.
• TLS termination: If TLS is terminated at a CDN or LB, SNI/Host will reflect the public hostname — use that value.
• Authentication: Hostname allowlisting is an access-layer control — keep authentication/authorization enforced on your API so someone else can’t call it just because the hostname is reachable.
• If your WAF only supports IP-based rules: You can combine hostname checks with resolved IPs — resolve the hostname to the current IPs and allow those, but this reintroduces dynamic-IP issues and needs monitoring for DNS changes.
If you’d like, I can:
• Confirm the exact hostname to allow if you share the Host header or SNI from a blocked request (redact any sensitive path or credentials).
• Suggest a minimal WAF rule example tailored to your WAF vendor if you tell me which WAF product you’re using.
Which would you like to do next — share a sample Host/SNI from a blocked log entry, or tell me your WAF vendor so I can suggest a concrete rule?gray-elephant-45673
03/06/2026, 3:46 PMtall-airline-16756
03/06/2026, 3:46 PM