Saltstack – OSSEC state using reactor

After concentrating on learning Salt over the last few weeks I have been constantly surprised by how simple yet powerful the system is. When I first began, I started by setting up my base configurations (users, iptables, ssh, etc) into states and as I progressed things began getting more and more sophisticated. For the most part everything has been completely smooth but as with learning anything new I have gotten stuck from time to time trying to figure out how to do something or troubleshooting a formatting error I introduced. Luckily with such a great and active community as well …

Saltstack: IPTABLES State

One of the first things I needed to get a handle on when I began to use Saltstack was pillar and the various YAML and JINJA formatting techniques. At the time of this writing I didnt see too many beginning to end examples so I thought I would start writing about how I am implementing Saltstack. My intent is to build on this example and end up with a modular deployment using Pillar to manage all the aspects of my infrastructure. In the following example I will create an ipsec state that we can use to dynamically open ports for …

Saltstack: Master Setup

What can I say about Saltstack but, WOW! After only using it a couple of days I already have a working CM implementation and not only is it easy to use and incredibly powerful but it is FAST! This is not to say I still dont want to spend more time with Chef but after using Saltstack I find it very hard to peel myself away! As with anything I enjoy I thought it would be a good idea to build out some walkthrough’s for my own reference as well as to help anyone else getting started. To begin I thought I would …

Chef: Workstation Quick Setup

While there are plenty of Chef tutorials out there I still found myself hunting around for one or two things when setting up my environment so I decided to write this article… Well, it is also for my own selfish reasons as writing these doc’s help to ensure that I learn and provide a reference when I need to set things up again. So! I have been getting started with Chef for configuration management and after building a local server or using Opscode hosted chef you will need to setup your workstation for knife and create a repository to store …

Python: Amazon Glacier Storage Archiver

As part of my drive to get comfortable with Python I decided to build a script to easily archive files to Amazon Glacier. Since I am cautious and perhaps a little paranoid, I wanted to make sure that the archives were encrypted. Next, since Glacier is cheap to send files too but expensive to restore from I wanted to make sure I could bring back my archives in smaller chunks as well as keep an inventory of what I have uploaded. So my script allows you to do the following: Create Glacier Vaults Delete Glacier Vaults Inventory / View the …

Netbackup Cloud Storage Server and Amazon S3

Recently I was playing around with Netbackup’s cloud server integration and after reading through their manual and the related doc’s I thought that the subject could use a much simpler explanation and perhaps a walk-through. So far from what I have seen the Netbackup Cloud Storage Server seems to work quite well. The setup wizard is relatively straight-forward and I was definitely impressed with how quickly data was backed up to S3. Basically, after everything is all said and done, backing up to S3 should behave pretty much the same way as backing up to a local tape or disk. …

Syslog-NG with TLS setup for centralized logging

Sure, I know this is more of a dull topic for most people as most of us have setup centralized syslog servers many times but when attempting to get Syslog-NG setup on Debian 6.0.6 I noticed that the majority of documentation was RedHat specific and I thought this topic could use a Debian walk through. My intent with this setup is to get a centralized syslog server where my remote clients (including network devices) could send their log files. I wanted to use the built in TLS encryption that Syslog-NG versions greater than 3.1 now support. This configuration is using …

Exchange ActiveSync and the Cisco ASA HTTPS Timeout

If you are running Exchange ActiveSync behind a Cisco ASA firewall you may receive Event ID: 1040 in your application event log. The event basically says: The average of the most recent heartbeat intervals [470] for request [Sync] used by clients is less than or equal to [540]. Make sure that your firewall configuration is set to work correctly with Exchange ActiveSync and direct push technology. Specifically, make sure that your firewall is configured so that requests to Exchange ActiveSync do not expire before they have the opportunity to be processed. To resolve this error we can bump up the …

Python: File System Storage Report

Recently I have been updating my scripting skills and learning Python. I have been using some of the great resources out there such as Codeacademy and the book “Dive into Python” but after getting about half way through I found a need to build some apps. So, please forgive me if the code looks horrible or if things could be done a better way but this is literally my first Python program… Anyways, on to the program. I needed a way to parse through terabytes of data and locate files that I could archive to different storage. The scan had …

ownCloud quick setup for Debian

First off I wanted to say that the documentation and installation of ownCloud is incredibly easy. I just wanted to add a few notes for people who are setting it up on a Debian distro as there is a slight difference from Ubuntu as well as offer some more assistance for Active Directory users. The following is the apt-get install string to install all needed dependencies for Debian. The apt-get string provided in ownCloud’s documentation should work fine for Ubuntu but you will get some missing package errors for php-pdo, php-xml, php-mbstring and php-zip in Debian: apt-get install apache2 php5 …