Skip to content

Instantly share code, notes, and snippets.

@imayobrown
Last active June 12, 2019 16:27
Show Gist options
  • Save imayobrown/4d6f1e546aa213f1b2b4c35219523f48 to your computer and use it in GitHub Desktop.
Save imayobrown/4d6f1e546aa213f1b2b4c35219523f48 to your computer and use it in GitHub Desktop.
Restore instances that have been isolated
#!/bin/bash
INSTANCE_TO_RESTORE=$1
PEM_PATH=$2
ssh -i $PEM_PATH -t centos@$INSTANCE_TO_RESTORE "sudo iptables -D OUTPUT 1 && sudo iptables -D OUTPUT 1"
ssh -i $PEM_PATH -t centos@$INSTANCE_TO_RESTORE "sudo iptables -D INPUT 1 && sudo iptables -D INPUT 1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment