Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
79 lines
2.6 KiB
Bash
Executable File
79 lines
2.6 KiB
Bash
Executable File
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
# Load IP configuration
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
|
|
|
|
|
|
# IP Conflict Investigation Script for ${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}}}}
|
|
|
|
IP="${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}}}}"
|
|
echo "=== Investigating IP: $IP ==="
|
|
echo ""
|
|
|
|
# Step 1: Ping test
|
|
echo "1. Testing connectivity..."
|
|
if ping -c 2 -W 2 $IP > /dev/null 2>&1; then
|
|
echo " ✅ Device is reachable"
|
|
else
|
|
echo " ❌ Device is NOT reachable"
|
|
exit 1
|
|
fi
|
|
|
|
# Step 2: ARP lookup
|
|
echo ""
|
|
echo "2. Checking ARP table..."
|
|
MAC=$(arp -n $IP 2>/dev/null | awk '{print $3}' | grep -E '^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$')
|
|
if [ -n "$MAC" ]; then
|
|
echo " ✅ MAC Address: $MAC"
|
|
echo " Checking MAC vendor..."
|
|
# Extract first 6 characters (OUI)
|
|
OUI=$(echo $MAC | tr '[:lower:]' '[:upper:]' | sed 's/[:-]//g' | cut -c1-6)
|
|
echo " OUI: $OUI"
|
|
else
|
|
echo " ⚠️ No ARP entry found (unusual)"
|
|
echo " Trying alternative method..."
|
|
MAC=$(ip neigh show $IP 2>/dev/null | awk '{print $5}')
|
|
if [ -n "$MAC" ]; then
|
|
echo " ✅ MAC Address (from ip neigh): $MAC"
|
|
else
|
|
echo " ❌ Could not determine MAC address"
|
|
fi
|
|
fi
|
|
|
|
# Step 3: SSH banner check
|
|
echo ""
|
|
echo "3. Checking SSH service..."
|
|
SSH_BANNER=$(timeout 3 ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no root@$IP "echo 'Connected'" 2>&1 | grep -i "ubuntu\|debian\|openssh" | head -1)
|
|
if [ -n "$SSH_BANNER" ]; then
|
|
echo " SSH Info: $SSH_BANNER"
|
|
else
|
|
SSH_TEST=$(timeout 3 ssh -o ConnectTimeout=2 -o StrictHostKeyChecking=no root@$IP 2>&1 | head -5)
|
|
echo " SSH Response:"
|
|
echo "$SSH_TEST" | head -3
|
|
fi
|
|
|
|
# Step 4: Port scan
|
|
echo ""
|
|
echo "4. Checking open ports..."
|
|
for port in 22 80 443 8006; do
|
|
if timeout 2 nc -zv -w 1 $IP $port > /dev/null 2>&1; then
|
|
echo " ✅ Port $port: OPEN"
|
|
else
|
|
echo " ❌ Port $port: CLOSED"
|
|
fi
|
|
done
|
|
|
|
# Step 5: Check Proxmox hosts
|
|
echo ""
|
|
echo "5. Checking Proxmox cluster for this IP..."
|
|
for host in ${PROXMOX_HOST_ML110:-192.168.11.10} ${PROXMOX_HOST_R630_01:-192.168.11.11} ${PROXMOX_HOST_R630_02:-192.168.11.12}; do
|
|
echo " Checking $host..."
|
|
ssh -o ConnectTimeout=3 root@$host "pct list 2>/dev/null | grep -E 'VMID|$IP' || qm list 2>/dev/null | grep -E 'VMID|$IP'" 2>/dev/null | head -5
|
|
done
|
|
|
|
echo ""
|
|
echo "=== Investigation Complete ==="
|