sysadmin

A 5-post collection

Solving Fail2Ban not banning IPs on Ubuntu 16.04

I recently installed Fail2Ban on my personal mail/web host as the number of "bad actors" has climbed a lot in recent years and I no longer felt comfortable just allowing them to pummel my server. I'm writing up another blog post shortly on everything I did and how it all works; however, I had one issue that kept cropping up: Running fail2ban-client status recidive returned the following: Status for the jail: recidive |- Filter | |- Currently failed: 158 | |- Total failed: 741 | `- File list: /var/log/fail2ban.log `- Actions |- Currently banned: 8 |- Total banned: 8 `- Banned IP list: 185.127.19.155 203.87.129.135 80.82.77.203 94.102.51.31...

Prevent your ServiceNow Developer Instance from being reclaimed

I’m a big ServiceNow fan.  I became a bigger fan when they opened up a new Developer Program that included access to a free, personal ServiceNow Instance.  Just go to that link, register, and then ask for your Developer Instance. Having a personal instance is amazing, because “back in the day” you’d have to request access to a shared demo Instance.  The problem with these is that they were often used as sandboxes by lots of other people, completely wrecking your ability to test ideas or see how something would react.  If you wanted to see an out-of-box Instance and compare to yours, you were hosed, these always had modifications to them. Now you don’t have to...

Correcting Invalid sys_class_name Entries in your CMDB

The Problem A few days ago, we started having strange behavior in our Configuration Management Database (CMDB).  When looking at certain classes of Configuration Items (CI) we would see the User Interface (UI) display repeated buttons, and there were no CIs in the List View.  Additionally, if you went to the Tables & Columns module and tried to delete all records from cmdbcinetgear, the UI would report that the table was already empty (but it wasn’t): Worse still, none of the New or Edit… buttons worked on this List View any longer. The Investigation Our partner talked internally, and found another consultant who had seen this behavior previously, he informed us that it occurs within CMDB List Views if...

Setting up Automatic Updates for Ubuntu

Keeping your system up to date is the single most important way to prevent security and malware issues.  Ubuntu provides nice tools for maintaining your system, but if you manage it via a command line you may be used to seeing: 1 2 3 packages can be updated. 3 updates are security updates. This is the Ubuntu system notifying you that it noticed there are 3 packages that have updates available.  This check is enabled by default and is part of the update-motd system.  Some background on how this works will provide insight into the workings of Ubuntu and then we’ll talk about automating those updates. Background update-motd is a system program introduced in Ubuntu that allows for the...

Create a Startup / Boot Script under Ubuntu

In managing Unix systems, you will often have occasion to have a process or action performed at boot time. There are several ways of accomplishing this goal, but the right way is to create an init script and configure it to run at the proper run levels. Here’s how to do that under Ubuntu. A valid LSB (Linux Standard Base) Init Script has 4 components: Provide, at least, the following actions: start, stop, restart, force-reload, and status (actually optional) Return proper exit status codes Document runtime dependencies Log messages using the Init.d functions: logsuccessmsg, logfailuremsg and logwarningmsg (optional) To document runtime dependencies you’ll have to define a header on your script. The header is required by the...