Extending a Windows File System after Resizing the Volume – Amazon Elastic Compute Cloud

Views: 754There are several short steps that you need to follow to enlarge your EBS volume on a Windows EC2 instance. After expanding the EBS Volume from the EC2 console, Windows needs to know whether you want it as the same Drive letter or to exapand the existing one.   https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/ebs-modify-volume.html  Modifying an EBS Volume …

Configuring a Windows Instance Using EC2Launch to reset password for a new AMI on EC2

Views: 4493I launched a new Windows Server 2016 on AWS. When packaging up an EC2 to pass on to clients or to the AWS Marketplace I am not sure what the issues were. I have switched back and forth to between SVR 2012 and 2016. I don’t do fancy stuff, just resetting the password I …

Change or Set ExecutionPolicy to Enable PowerShell Scripts to Run

Views: 2959I know that it is more secure to allow only signed scripts to run, but this sript from Micrososft allows you to write your own PowerShell scripts and actually run them with ISI.   Script needs to run as System user <# ================================================================================ ========= Introduction to Change-ExecutionPolicy.ps1 ======================================= ================================================================================ Name: Change-ExecutionPolicy Purpose: Allow User/Administrator …

Using robots.txt to block @Yandex #DDOS from #Russia @yandexcom

Views: 1193 User-agent: YandexBot Disallow: / User-agent: YandexDirect Disallow: / User-agent: YandexDirectDyn Disallow: / User-agent: YandexImages Disallow: / User-agent: YaDirectFetcher Disallow: / User-agent: YandexBlogs Disallow: / User-agent: YandexNews Disallow: / User-agent: YandexPagechecker Disallow: / User-agent: YandexMetrika Disallow: / User-agent: YandexCalendar Disallow: / Also see: https://charmingwebdesign.com/blocking-ip-addresses-of-any-country-with-iptables/     ‘YandexBot’ — the main indexing robot ‘YandexDirect’ — downloads …

Set Mautic to set a simple bounce adress

Views: 1414F you do not have the means to setup a catchall: In app/bundles/EmailBundle/Helper/MailHelper.php: Change: public function generateBounceEmail($idHash = null) { $monitoredEmail = false; if ($settings = $this->isMontoringEnabled(‘EmailBundle’, ‘bounces’)) { // Append the bounce notation list($email, $domain) = explode(‘@’, $settings[‘address’]); $email .= ‘+bounce’; if ($idHash) { $email .= ‘_’.$this->idHash; } $monitoredEmail = $email.’@’.$domain; } return …

Script to create a #docker swarm mode cluster

Views: 1782I found this script on GitHub.  I have been writing a similar one, with less functionality and flexibility, but that’s OK it is for Databases with volumes. #!/bin/bash Size=3 if [ -z “${DOCKER_MACHINE_DRIVER}” ]; then DOCKER_MACHINE_DRIVER=virtualbox fi # REGISTRY_MIRROR_OPTS=”–engine-registry-mirror https://jxus37ac.mirror.aliyuncs.com” # INSECURE_OPTS=”–engine-insecure-registry 192.168.99.0/24″ STORAGE_OPTS=”–engine-storage-driver overlay2″ MACHINE_OPTS=”${STORAGE_OPTS} ${INSECURE_OPTS} ${REGISTRY_MIRROR_OPTS}” function create_nodes() { for i in …

AWS Cloudformation pass parameters from pull down menu to UserData.

Views: 8681Declaring the Ref s and Mapping Findinmap in CloudFormation which can be used in userdata on your EC2 server (maybe others too) Almost 20 hours of learning and making mistakes I have been working on making a Multi Region Replicated MongoDB Replica Set with Oneclick installation via AWS Marketplace. I got the script working. …

This sounds really great and affordable. AquaSec Security Has On-Demand Scanner for Container Images on AWSMarketplace

Views: 1056For 29 cents you can find nasty stuff on your Images. Using the marketplace scanner, everything from Trojans to forgotten keys, and Vulnerabilities  were found. I can’t wait to try this. I don’t know if I know the folks from this biz, but pray for their success. Aqua’s On Demand Vulnerability Scanner – How it …

How do I parse command line arguments in #Bash? with flags like -s for speed or -ami for AMI ID

Views: 1243I am doing way too much scripting, back to my simple work. #!/bin/bash for i in “$@” do case $i in -e=*|–extension=*) EXTENSION=”${i#*=}” shift # past argument=value ;; -s=*|–searchpath=*) SEARCHPATH=”${i#*=}” shift # past argument=value ;; -l=*|–lib=*) LIBPATH=”${i#*=}” shift # past argument=value ;; –default) DEFAULT=YES shift # past argument with no value ;; *) # …

Tag EC2 & EBS Volumes on Creation @jeffbar – #aws cli needs #pip install not apt

Views: 2157Creating EBS Volumes and EC2 Instances with tags from the beginning is new Believe it or not this announcement that you can tag your ec2 or volume upon creation is new from March 2017. I am presently working with Ubuntu Xenial. When you install aws cli from the apt , it has the old …

Change your #bash environment in your #script with Set Builtin even in #Windows

Views: 1137Use Bash even in Windows The Set Builtin This builtin is so complicated that it deserves its own section. set allows you to change the values of shell options and set the positional parameters, or to display the names and values of shell variables. set set [–abefhkmnptuvxBCEHPT] [-o option-name] [argument …] set [+abefhkmnptuvxBCEHPT] [+o option-name] [argument …