Server Connectivity
The firewall controls outbound traffic from clients inside awf to external servers. This guide covers connecting to HTTP, HTTPS, and gRPC servers.
HTTP/HTTPS servers
Section titled “HTTP/HTTPS servers”Clients inside awf can connect to any whitelisted domain over HTTP or HTTPS.
# Connect to HTTPS serversudo awf --allow-domains api.example.com -- \ curl https://api.example.com/data
# Connect to HTTP server (non-TLS)sudo awf --allow-domains 'http://legacy.example.com' -- \ curl http://legacy.example.com/apigRPC servers
Section titled “gRPC servers”gRPC connections work through the firewall when using standard ports.
gRPC over HTTPS (port 443)
Section titled “gRPC over HTTPS (port 443)”# gRPC with TLS on standard HTTPS portsudo awf --allow-domains grpc.example.com -- \ grpcurl grpc.example.com:443 myservice.Service/MethodgRPC-web over HTTP/HTTPS
Section titled “gRPC-web over HTTP/HTTPS”# gRPC-web uses standard HTTP/HTTPS portssudo awf --allow-domains api.example.com -- \ grpcurl -plaintext api.example.com:80 myservice.Service/MethodConnecting to host services
Section titled “Connecting to host services”Use host.docker.internal to connect from inside awf to services running on your host machine:
# Connect to a server running on the host (e.g., localhost:3000)sudo awf --allow-domains host.docker.internal -- \ curl http://host.docker.internal:3000/apiServer inside, client outside
Section titled “Server inside, client outside”To run a server inside awf that accepts external connections, use --keep-containers and connect via Docker:
# Start server inside awf (stays running)sudo awf --allow-domains example.com --keep-containers -- \ python3 -m http.server 8080 &
# Connect from host using docker execdocker exec awf-agent curl http://localhost:8080Bidirectional communication
Section titled “Bidirectional communication”A server that accepts requests and makes outbound calls to whitelisted domains:
# API gateway that proxies to backendsudo awf --allow-domains backend.example.com --keep-containers -- \ node gateway.js
# Gateway can:# - Accept connections on its internal port# - Make outbound requests only to backend.example.comDebugging connectivity
Section titled “Debugging connectivity”# Keep containers running for inspectionsudo awf --allow-domains example.com --keep-containers -- sleep 60
# Test connectivity from insidedocker exec awf-agent curl -v https://example.com
# Check Squid logs for blocked requestssudo grep "TCP_DENIED" /tmp/squid-logs-*/access.log
# View all trafficawf logs --format prettySee also
Section titled “See also”- Domain Filtering - Allowlists, blocklists, wildcards
- CLI Reference - All options