Skip to content

Simple network check tool

License

Notifications You must be signed in to change notification settings

silogen/network-check

Repository files navigation

Network Check

Network diagnostic tools for detecting DLP/proxy interference with large file downloads from services like HuggingFace, Docker Registry, and GitHub.

Tools Included

  • dlp_analyzer_v3.py - Python-based DLP interference analyzer with detailed timing metrics
  • network_dlp_diagnostics.sh - Comprehensive bash diagnostic suite
  • service_specific_tests.sh - Targeted tests for HuggingFace, Docker, and GitHub

Running Directly on a Server

Prerequisites

# Debian/Ubuntu
apt-get install -y python3 curl openssl dnsutils bc iputils-ping iproute2 traceroute

# RHEL/CentOS/Fedora
dnf install -y python3 curl openssl bind-utils bc iputils iproute traceroute

Run the scripts

# Clone the repo
git clone https://github.com/silogen/network-check.git
cd network-check

# Make scripts executable
chmod +x *.sh *.py

# Run Python analyzer (standard tests)
python3 dlp_analyzer_v3.py

# Run Python analyzer with 100MB tests
python3 dlp_analyzer_v3.py --large

# Run Python analyzer with 1GB tests
python3 dlp_analyzer_v3.py --xlarge

# Save report to file
python3 dlp_analyzer_v3.py --large -o report.txt

# Run bash network diagnostics
./network_dlp_diagnostics.sh ./output

# Run service-specific tests
./service_specific_tests.sh ./output

Running with Docker

Pull the image

docker pull ghcr.io/silogen/network-check:latest

Run all diagnostics (stays alive for inspection)

docker run -d --name network-check \
  -v $(pwd)/output:/output \
  ghcr.io/silogen/network-check:latest

# Watch the logs
docker logs -f network-check

# Exec in to view results
docker exec -it network-check /bin/bash
ls /output

# Copy results out
docker cp network-check:/output ./results

# Clean up
docker stop network-check && docker rm network-check

Run all diagnostics (exit when complete)

docker run --rm \
  -e KEEP_ALIVE=false \
  -v $(pwd)/output:/output \
  ghcr.io/silogen/network-check:latest

Run with large file tests (100MB)

docker run --rm \
  -e KEEP_ALIVE=false \
  -v $(pwd)/output:/output \
  ghcr.io/silogen/network-check:latest --large

Run individual scripts

# Python analyzer only
docker run --rm \
  --entrypoint python3 \
  ghcr.io/silogen/network-check:latest \
  /app/dlp_analyzer_v3.py --large

# Bash network diagnostics only
docker run --rm \
  --entrypoint /app/network_dlp_diagnostics.sh \
  ghcr.io/silogen/network-check:latest \
  /output

# Service-specific tests only
docker run --rm \
  --entrypoint /app/service_specific_tests.sh \
  ghcr.io/silogen/network-check:latest \
  /output

Running in Kubernetes

Run as a Pod (stays alive for inspection)

kubectl apply -f k8s/pod.yaml

# Watch logs
kubectl logs -f network-check

# Exec in to view results
kubectl exec -it network-check -- /bin/bash
ls /output

# Copy results locally
kubectl cp network-check:/output ./network-check-results

# Clean up
kubectl delete pod network-check

Run interactively (one-liner)

kubectl run network-check --rm -it \
  --image=ghcr.io/silogen/network-check:latest \
  --env="KEEP_ALIVE=false" \
  -- --xlarge

Environment Variables

Variable Default Description
OUTPUT_DIR /output Directory where results are saved
KEEP_ALIVE true Keep container running after tests complete

Output Files

After running, the following files are available in OUTPUT_DIR:

  • dlp_report.txt - DLP analyzer report
  • dlp_analyzer.log - Full output from Python analyzer
  • network_diagnostics/ - Network diagnostics results
  • network_diagnostics.log - Full output from network diagnostics
  • service_tests/ - Service-specific test results
  • service_tests.log - Full output from service tests

Building Locally

docker build -t network-check .
docker run --rm -v $(pwd)/output:/output network-check

What It Detects

  • SSL/TLS certificate interception by corporate proxies
  • High time-to-first-byte (TTFB) indicating DLP scanning delays
  • Buffering patterns suggesting store-and-forward proxies
  • Throughput degradation compared to baseline
  • DNS resolution differences
  • HTTP header injection by proxies

About

Simple network check tool

Resources

License

Stars

Watchers

Forks

Packages