Yubikey + OpenVPN in Debian/Ubuntu

Posted by & filed under AWS/Linux/Unix/Devops stuff.

The instructions provided by Yubico for integrating two-factor auth with OpenVPN lack a PAM configuration for Debian based systems. The following configuration file (/etc/pam.d/openvpn) worked for me: auth required pam_yubico.so authfile=/path/to/yubikeys id=22010 debug auth required pam_unix.so try_first_pass debug shadow nodelay account required pam_unix.so

Copy Installed Debian/Ubuntu Packages Between Machines

Posted by & filed under AWS/Linux/Unix/Devops stuff.

The following will generate a listing of installed Debian/Ubuntu packages, and will install packages from that list on another machine. Just make sure you have the same sources set in /etc/apt/sources.list: dpkg –get-selections > package_list scp package_list to your destination machine, and: dpkg –set-selections < package_list apt-get -u dselect-upgrade to install these packages.

Optimizing Apache and PHP for Amazon EC2

Posted by & filed under AWS/Linux/Unix/Devops stuff.

Some useful performance optimization tips for optimizing Apache, PHP FPM, and APC for Amazon EC2. In this case the configuration examples are the settings that work best for our Small instances, but certainly these concepts will apply to other instance types as well.