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
# Welcome to the ADM UDF Lab. | |
Do everything from the jumpbox. | |
A note on credential complexity: In anticipation of reports of credential triviality, it's worth mentioning up front that you'll notice some very simple passwords in this lab. This is because complex passwords do not keep us safe, and they are not going to keep you or anyone else out of anything if you already breached big red's SSO and firewalls and got into the lab, so we're just going to save time for everyone and skip over added frustration and false senses of security. | |
## Description of the VMs in this Lab | |
1. NMS - this is your NMS and ADM management platform. creds are admin/admin | |
2. WEST-GW - this is one of your NGINX+ and NGINX-AGENT instances | |
3. EAST-GW - this is another | |
4. WWW - this is a box of web servers, with one listening on port 80 |
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 | |
# Requires: awscli (http://aws.amazon.com/cli/) | |
# Prints out a list of all security groups and their settings, just for quickly auditing it. | |
# Your AWS credentials | |
if [ -z ${AWS_ACCESS_KEY_ID} ]; then | |
export AWS_ACCESS_KEY_ID='***' | |
export AWS_SECRET_ACCESS_KEY='***' | |
fi |
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
GET https://392219492e943f0297bd0fdc1896d0c4.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html | |
GET https://ad-cdn.technoratimedia.com/html/usersync.html | |
GET https://ad-delivery.net/px.gif | |
GET https://ad.doubleclick.net/favicon.ico | |
GET https://adrta.com/i | |
GET https://ads.pubmatic.com/AdServer/js/pwt/156512/6397/pwt.js | |
GET https://ads.stickyadstv.com/additional-scripts/ | |
GET https://adservice.google.com/adsid/integrator.js | |
GET https://amplify.outbrain.com/cp/obtp.js | |
GET https://analytics.twitter.com/i/adsct |
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
GET https://392219492e943f0297bd0fdc1896d0c4.safeframe.googlesyndication.com/safeframe/1-0-38/html/container.html | |
GET https://ad-cdn.technoratimedia.com/html/usersync.html | |
GET https://ad-delivery.net/px.gif | |
GET https://ad.doubleclick.net/favicon.ico | |
GET https://adrta.com/i | |
GET https://ads.pubmatic.com/AdServer/js/pwt/156512/6397/pwt.js | |
GET https://ads.stickyadstv.com/additional-scripts/ | |
GET https://adservice.google.com/adsid/integrator.js | |
GET https://amplify.outbrain.com/cp/obtp.js | |
GET https://analytics.twitter.com/i/adsct |
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
# Count total EBS based storage in AWS | |
aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
# Count total EBS storage with a tag filter | |
aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
# Describe instances concisely | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
# Wait until $instance_id is running and then immediately stop it again | |
aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
# Get 10th instance in the account |