Skip to content

Instantly share code, notes, and snippets.

@donatello
Created December 16, 2016 12:32
Show Gist options
  • Save donatello/cfa09d78e9db6bd945b8ce5b8974db21 to your computer and use it in GitHub Desktop.
Save donatello/cfa09d78e9db6bd945b8ce5b8974db21 to your computer and use it in GitHub Desktop.
#!/bin/bash
set -x
for i in $(seq 10); do
sudo iptables -I INPUT -p tcp --dport 9000 -j REJECT --reject-with tcp-reset
mc ls myminio/bucket
sudo iptables -D INPUT -p tcp --dport 9000 -j REJECT --reject-with tcp-reset
echo
mc cp --quiet /tmp/config-err-qSJmsi myminio/bucket/$i
echo
echo
done
@donatello
Copy link
Author

Also tried with:

sudo iptables -I INPUT -p tcp --dport 9000 -j REJECT 

and

sudo iptables -D INPUT -p tcp --dport 9000 -j DROP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment