This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# @author: Hernan Garcia <[email protected]> | |
# https://gist.github.com/hernandanielg/430f3adb8e297f37ef6f0efb45a51bdc | |
# | |
# usage: ./delete_iam_user.sh [options] <user> | |
# options: | |
# -d|--dry-run dry run mode | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This example assumes the NGINX proxy is on the same host as the Plex Media Server. | |
# To configure Plex Media Server to serve requests without requiring authentication, | |
# ensure that your LAN subnet is correctly added to the advanced server setting called | |
# "List of IP addresses and networks that are allowed without auth". Example: | |
# 192.168.0.1/24 | |
upstream plex-upstream { | |
server 127.0.0.1:32400; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Security groups that contain 0.0.0.0/0 rules | |
aws ec2 describe-security-groups --filters Name=ip-permission.cidr,Values=0.0.0.0/0 --output=text | grep SECURITYGROUPS | |
# Security groups for ElasticSearch | |
aws ec2 describe-security-groups --filters Name=ip-permission.from-port,Values=9200 --output=text | grep SECURITYGROUPS | |
# Search last 10,000/1MB of CloudTrail logs for 'AccessDenied' (removed AWS account number from stream name) | |
aws logs get-log-events --log-group-name CloudTrail/DefaultLogGroup --log-stream-name 000000000000_CloudTrail_eu-west-1 | grep AccessDenied | |
# Get number of AWS API calls in time period (assumes a Cloudwatch Logs 'catch-all' filter and metric has been created against CloudTrail logs) |