create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
create different ssh key according the article Mac Set-Up Git
$ ssh-keygen -t rsa -C "[email protected]"
| { | |
| "AWSTemplateFormatVersion":"2010-09-09", | |
| "Description":"This Template creates an Amazon Cloudwatch Alert for Trusted Advisor open ports, protocols, IAM credentials not rotated in 90 days and must be created in us-east-1.", | |
| "Parameters":{ | |
| "EmailAddress": { | |
| "Description": "Email Address for sending SNS notifications for TrustedAdvisor", | |
| "Type": "String" | |
| } | |
| }, | |
| "Resources":{ | 
| import boto3 | |
| client = boto3.client('ec2', aws_access_key_id=access_key, aws_secret_access_key=secret_key, | |
| region_name='us-east-1') | |
| ec2_regions = [region['RegionName'] for region in client.describe_regions()['Regions']] | 
| go-audit repo: | |
| https://github.com/slackhq/go-audit | |
| go-audit example configurations: | |
| https://github.com/slackhq/go-audit/tree/master/examples | |
| Blog post: Ryan Huber - Distributed Security Alerting | |
| https://medium.com/several-people-are-coding | |
| Video: NSA TAO Chief on Disrupting Nation State Hackers | 
| ''' | |
| This is an example of how to send data to Slack webhooks in Python with the | |
| requests module. | |
| Detailed documentation of Slack Incoming Webhooks: | |
| https://api.slack.com/incoming-webhooks | |
| ''' | |
| import json | |
| import requests | 
| #!/usr/bin/env python | |
| import optparse | |
| import sys | |
| from boto.s3.connection import S3Connection | |
| def sign(bucket, path, access_key, secret_key, https, expiry): | |
| c = S3Connection(access_key, secret_key) | |
| return c.generate_url( | |
| expires_in=long(expiry), | 
There are two parts to this:
In general, a CentOS 7 x86_64 box in AWS EC2; in specific, this Packer profile.
| # first we download the list of IP ranges from CloudFlare | |
| wget https://www.cloudflare.com/ips-v4 | |
| # iterate over the lines in the downloaded file | |
| # make sure to set `--group-id` and `--port`; more details at http://docs.aws.amazon.com/cli/latest/reference/ec2/authorize-security-group-ingress.html | |
| while read p; do aws ec2 authorize-security-group-ingress --group-id sg-e0000000 --protocol tcp --port 80 --cidr $p; done< ips-v4 |