#!/bin/bash # Check if firewall might be blocking the connection GPU_VM="10.0.30.63" echo "=== Firewall Check ===" echo "" echo "The fact that Ollama shows ':::11434' means it's listening on all interfaces." echo "If curl still times out, it's likely a firewall issue." echo "" echo "On the GPU VM, check firewall:" echo " # Check if firewall is running:" echo " sudo ufw status" echo " # OR" echo " sudo iptables -L -n | grep 11434" echo "" echo "If firewall is blocking, allow the port:" echo " sudo ufw allow 11434/tcp" echo " # OR for iptables:" echo " sudo iptables -A INPUT -p tcp --dport 11434 -j ACCEPT" echo "" echo "Testing connection from local machine..." timeout 3 curl -v http://$GPU_VM:11434/api/tags 2>&1 | grep -E "Connected|timeout|refused|Connection" | head -3