How To Enable DNS Hostnames for AWS VPC

Author: , August 8th, 2016

When you launch an instance into a VPC, AWS provides the instance with a public DNS hostname only if DNS hostnames are enabled for the VPC. By default, DNS hostnames are enabled only for default VPCs and VPCs that you create using the VPC wizard in the VPC console. If you enable DNS hostnames and […]

How To Fix Apache VirtualHost Overlap on Port 443 on AWS Linux

Author: , July 4th, 2016

If you get this error when starting Apache or via apachectl configtest: [warn] _default_ VirtualHost overlap on port 443, the first has precedence then you must add: NameVirtualHost *:443 to /etc/httpd/conf/httpd.conf, then restart Apache

How To Fix a “Corrupted index cache file” Error in Dovecot

Author: , June 17th, 2016

Jun 17 00:02:45 inbound dovecot: IMAP(yourName): Corrupted index cache file /home/yourName/Maildir/dovecot.index.cache: invalid record size

As always, YMMV. Proceed with caution.

How To Install the AWS CLI

Author: , March 29th, 2016

http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html AWS CLI v2

AWS CLI v1

ls -l ~/.aws

cat ~/.aws/config

cat ~/.aws/credentials

How To Fix Peer Not Authenticated Errors While Using AWS API Tools

Author: , February 9th, 2016

I was getting the following errors when using an older version of the Amazon EC2 API Tools: $ ec2-describe-regions Unknown problem connecting to host: ‘https://ec2.amazonaws.com’ Unable to execute HTTP request: peer not authenticated The solution was to upgrade to the latest AWS CLI tools and start using the aws command instead. For example: aws ec2 […]

How To Check Amazon RDS MySQL Servers in Nagios Without Ping

Author: , August 13th, 2015

Amazon Web Services (AWS) offers MySQL Server via the Relational Database Service (RDS) offering. Unfortunately, AWS doesn’t allow ICMP Ping to reach the nodes, so as configured by default, Nagios will fail on the host check. The solution is to submit a Passive Check for that host. Login to the Nagios web console Click on […]

How To Find the AWS Region and Availability Zone Via the CLI

Author: , June 30th, 2015

/opt/aws/bin/ec2-metadata | grep placement

How To Patch the Linux Ghost gethostbyname Buffer Overflow Vulnerability in glibc

Author: , January 28th, 2015

As per ARS Technica: “An extremely critical vulnerability affecting most Linux distributions gives attackers the ability to execute malicious code on servers used to deliver e-mail, host webpages, and carry out other vital functions.” To patch, run: yum update glibc Article: http://arstechnica.com/security/2015/01/highly-critical-ghost-allowing-code-execution-affects-most-linux-systems/ Amazon Alert: https://alas.aws.amazon.com/ALAS-2015-473.html Original Advisory: http://www.openwall.com/lists/oss-security/2015/01/27/9

How To Fix “Could Not Bind to Address: Permission Denied” Errors on CentOS/Amazon Linux

Author: , October 16th, 2014

Permission denied: could not bind to address To disable on the fly: # getenforce Enforcing # setenforce 0 # getenforce Permissive # sestatus To survive a reboot: # vi /etc/sysconfig/selinux Change: SELINUX=enforcing to SELINUX=disabled ~or~ SELINUX=permissive

How To Patch the ShellShock bash Bug on Older or Beta AWS Linux AMI’s

Author: , October 1st, 2014

This is the standard upgrade method for AWS Linux AMI’s:

Or use this for the version 2012.09, 2012.03, or 2011.09 repositories:

For older AWS Linux AMI’s, you may not be able to use the standard upgrade method as described in this link: https://alas.aws.amazon.com/ALAS-2014-419.html These are the steps needed to manually patch bash 4.1: […]