Skip to content

Instantly share code, notes, and snippets.

@aaroncaito
Created February 17, 2017 17:14
Show Gist options
  • Save aaroncaito/766852e8de05555f9831bf6ad33c2a00 to your computer and use it in GitHub Desktop.
Save aaroncaito/766852e8de05555f9831bf6ad33c2a00 to your computer and use it in GitHub Desktop.
cidrs=(1.18.12.0/24
1.15.46.253/24
1.65.231.0/24)
for cidr in ${cidrs[@]};do aws ec2 authorize-security-group-ingress --profile <some-profile> --group-id <some-sec-group> --protocol tcp --port 22 --cidr $cidr --dry-run; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment