Files
secops/deploy-ufw-fix.sh
anthonyrawlins 97be5c8a54 Initial commit - Security operations and hardening tools
- Added Ansible playbooks for security hardening (UFW, Fail2Ban)
- Implemented SSH key management and host synchronization tools
- Created UFW hardening scripts and network security configurations
- Added Cockpit-Traefik reverse proxy setup documentation

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-27 09:35:58 +10:00

30 lines
754 B
Bash

#!/bin/bash
# Deploy UFW fix to all swarm nodes
# Usage: ./deploy-ufw-fix.sh
NODES=("192.168.1.27" "192.168.1.72" "192.168.1.113" "192.168.1.132")
SCRIPT_PATH="/home/tony/AI/secops/harden-ufw.sh"
echo "Deploying UFW fix to all swarm nodes..."
for node in "${NODES[@]}"; do
echo "Processing node: $node"
# Copy script to node
scp "$SCRIPT_PATH" tony@$node:/tmp/harden-ufw.sh
# Execute script on node
ssh tony@$node "chmod +x /tmp/harden-ufw.sh && sudo /tmp/harden-ufw.sh"
# Restart Docker service
ssh tony@$node "sudo systemctl restart docker"
# Clean up
ssh tony@$node "rm /tmp/harden-ufw.sh"
echo "Node $node completed"
echo "---"
done
echo "UFW deployment complete on all nodes"