Files
proxmox/analyze-all-domains.sh
defiQUG cb47cce074 Complete markdown files cleanup and organization
- Organized 252 files across project
- Root directory: 187 → 2 files (98.9% reduction)
- Moved configuration guides to docs/04-configuration/
- Moved troubleshooting guides to docs/09-troubleshooting/
- Moved quick start guides to docs/01-getting-started/
- Moved reports to reports/ directory
- Archived temporary files
- Generated comprehensive reports and documentation
- Created maintenance scripts and guides

All files organized according to established standards.
2026-01-06 01:46:25 -08:00

128 lines
4.5 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Analyze all Cloudflare domains for tunnel configurations and issues
set -e
echo "═══════════════════════════════════════════════════════════"
echo " Cloudflare Domains Analysis"
echo "═══════════════════════════════════════════════════════════"
echo ""
DOMAINS=(
"commcourts.org"
"d-bis.org"
"defi-oracle.io"
"ibods.org"
"mim4u.org"
"sankofa.nexus"
)
echo "Domains to analyze:"
for domain in "${DOMAINS[@]}"; do
echo " - $domain"
done
echo ""
# Check if Cloudflare API credentials are available
if [ -z "$CLOUDFLARE_API_TOKEN" ] && [ -z "$CLOUDFLARE_EMAIL" ] || [ -z "$CLOUDFLARE_API_KEY" ]; then
echo "⚠️ Cloudflare API credentials not found in environment"
echo ""
echo "To use API analysis, set:"
echo " export CLOUDFLARE_API_TOKEN=your-token"
echo " # OR"
echo " export CLOUDFLARE_EMAIL=your-email"
echo " export CLOUDFLARE_API_KEY=your-key"
echo ""
echo "Continuing with DNS-based analysis..."
echo ""
fi
# Analyze each domain
for domain in "${DOMAINS[@]}"; do
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Analyzing: $domain"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Check DNS records
echo "DNS Records:"
if command -v dig &> /dev/null; then
# Get NS records
NS_RECORDS=$(dig +short NS "$domain" 2>/dev/null | head -2)
if [ -n "$NS_RECORDS" ]; then
echo " Name Servers:"
echo "$NS_RECORDS" | while read ns; do
echo " - $ns"
done
fi
# Get A records
A_RECORDS=$(dig +short A "$domain" 2>/dev/null)
if [ -n "$A_RECORDS" ]; then
echo " A Records:"
echo "$A_RECORDS" | while read ip; do
echo " - $ip"
done
fi
# Get CNAME records (for subdomains)
CNAME_COUNT=$(dig +short "$domain" ANY 2>/dev/null | grep -c "CNAME" || echo "0")
if [ "$CNAME_COUNT" -gt 0 ]; then
echo " CNAME Records: $CNAME_COUNT found"
fi
else
echo " ⚠️ 'dig' not available - install bind-utils or dnsutils"
fi
echo ""
# Check for tunnel references
echo "Tunnel Analysis:"
case "$domain" in
"d-bis.org")
echo " ✅ Analyzed - See DNS_ANALYSIS.md"
echo " ⚠️ Issues: Shared tunnel down, low TTL"
;;
"mim4u.org")
echo " ⚠️ CONFLICT: Also exists as subdomain mim4u.org.d-bis.org"
echo " Action: Resolve naming conflict"
;;
"sankofa.nexus")
echo " Matches infrastructure naming"
echo " Potential: Infrastructure management domain"
;;
*)
echo " ❓ Not yet analyzed"
;;
esac
echo ""
# Check if domain is accessible
echo "Connectivity:"
if command -v curl &> /dev/null; then
HTTP_CODE=$(curl -s -o /dev/null -w "%{http_code}" --max-time 5 "https://$domain" 2>/dev/null || echo "000")
if [ "$HTTP_CODE" != "000" ] && [ "$HTTP_CODE" != "000" ]; then
echo " ✅ HTTPS accessible (HTTP $HTTP_CODE)"
else
echo " ⚠️ HTTPS not accessible or timeout"
fi
else
echo " ⚠️ 'curl' not available"
fi
echo ""
echo ""
done
echo "═══════════════════════════════════════════════════════════"
echo " Analysis Complete"
echo "═══════════════════════════════════════════════════════════"
echo ""
echo "Next Steps:"
echo " 1. Review ALL_DOMAINS_ANALYSIS.md for detailed findings"
echo " 2. Fix d-bis.org issues: ./fix-shared-tunnel.sh"
echo " 3. Resolve mim4u.org conflict"
echo " 4. Analyze remaining domains in Cloudflare Dashboard"
echo ""