set -euo pipefail
echo '== ip route =='
ip route
echo '== addr =='
ip -4 addr show eth0 || true
echo '== iptables INPUT =='
iptables -S INPUT || true
echo '== iptables nat docker =='
iptables -t nat -S | grep -E '8088|DOCKER' || true
echo '== docker inspect ports/networks =='
docker inspect infisical-app --format '{{json .HostConfig.PortBindings}} {{json .NetworkSettings.Ports}} {{json .NetworkSettings.Networks}}'
echo '== local curl loopback =='
curl -fsS --max-time 5 http://127.0.0.1:8088/api/status && echo
echo '== eth0 curl =='
IP=$(ip -4 addr show eth0 | awk '/inet /{sub(/\/.*$/,"",$2); print $2; exit}')
echo "eth0=$IP"
curl -v --max-time 5 "http://$IP:8088/api/status" 2>&1 | sed -E 's/(Authorization:|Cookie:).*/\1 [REDACTED]/I' || true
