Author Archive
Golang: Determine a device major/minor number
While working on a monitoring agent for a service we will be introducing soon. I needed a way to determine the Major/Minor numbers for a device (e.g. /dev/mapper/datavg-srvlv). It is actually much easier than I though. My first version as a gist. But a much simpler solution exists, without using cgo. stat := syscall.Stat_t{} _ [...]
Read moreAmusing a Sysadmin
As most geek discussions go.. we like to push the envelope — to see what is possible! As we discussed using chattr to protect a file from being overwritten, it occurred to me that we might perform a weak form of “Inception” on chattr! So I ran:
Read moreBlocking WordPress Brute Force Attacks against wp-login.php
We had a support request recently that indicated a server was under heavy load due to a wordpress wp-login.php brute force login attack. This attack was impacting 3 customer servers from more than 500 different IP addresses. We needed a solution fast. Others on the internet have reported tens of thousands of unique IPs involved [...]
Read morePostfix Dovecot User Admin Script
While working on a postfix/dovecot non-mysql virtual domain configuration, I needed a simple admin script to add new users. The script below is what I came up with after about 30 minutes. I was unable to find something that met my needs on the interweb, so I hope this post finds someone else in need! [...]
Read moreTerabytes on a budget – 106TB for $8788
When working with a client, we were discussing storage for an application they have developed. Storage price was a key component for success of this product. I read the BackBlaze posts here, and here — but I wanted a mix of cost savings, off the shelf parts, and hot-swappable drives.
Read moreDesigning for failure with Amazon Web Services
Avoid single points of failure. You can and should assume everything will fail. Start by listing all major points of your architecture, then break it down further, and then maybe one more level. Now review each of these points and consider what would happen if any of these failed.
Read moreSecuring SSH and WordPress with two factor authentication
I wrote a post about using Google Authenticator for SSH a month ago. After writing this post, I started looking at other solutions in the space for two factor authentication. Yubikeys are USB based, and require no device drivers. They work with Mac, Linux, or Windows and are priced starting at $25 each. Compared to [...]
Read moreHow little you know, and some useful commands for the week
Early in my career, I was writing a shell script and needed to print a line-number for each line in a text file. I ended up coming up with some function that did just what I needed. I don’t recall the exact method, but it was something like:
Read moreTwo Factor SSH with Google Authenticator
Last week, Google enabled two factor authentication for everyone. This article explains how to install and configure Google Authenticator in conjunction with SSH for two factor authentication. Two-factor authentication relies on something you know (a password) and something you have (your phone).
Read moreAmazon EC2 instance not starting
While working on a failed EC2 (ebs backed) instance recently, we were presented with an instance that would not start after reboot or stop/start. tl;dr: Create a snapshot of the existing EBS vol; remount and edit etc/fstab; re-attach and start the instance.
Read more