Mar 10

I wanted to write a brief posting on some basic ways to help remotely administer Ubuntu/Debian boxes.  Over the past few months I’ve been tinkering with various methods of handling this and what I’ve come up with seems to work fairly well.  It basically consists of two applications: apticron, which monitors repositories for package updates, and logcheck, which monitors logs in for any security or other noteworthy entries.

Apticron is very easy to set up, it’s in the repositories and requires basically no configuration.  It will drop a script in /etc/cron.daily and that is about it, emailing any reports to root.  Of course this can be modified through a .forward or an entry in /etc/aliases.

Logcheck is fairly simple to set up as well – it is also in the repositories.  Once installed, edit the /etc/logcheck/logcheck.conf file to configure.  The first thing you will want to set is the REPORTLEVEL setting, options are “workstation”, “server” (default value), or “paranoid”.  I use server on mine, which gives a good amount of detail. I would advise against using paranoid unless the server is extremely locked down and users do not typically login.  Workstation is good for a desktop environment.  The only other variable I edited was SENDMAILTO.  Logcheck works by basically comparing each  logentry against a set of regular expressions and generate a report if it does not match.  I had to modify one or two regex’s slightly to fix false positives, if you want my changes just ask and I’ll send them over.

One other small gem I want to mention : gkrellm.  I use this on both my desktop and server, it is invaluable for providing real-time system performance metrics.  Sure, it does not have any logging capabilities and thus unsuitable in a large-scale environment but for keeping an eye on one or two boxes it fits the bill quite nicely.

Oct 17

This question stumped me for awhile several years back, at the time I was working from home and my ISP would block SMTP relaying to any host other then their own (as most typically do).  I already had a free Dynamic DNS account with DynDNS  and decided to add their inexpensive Mailhop Outbound service which worked great and solved all my problems for a whole $15/year*.  Thinking about it more I figured it would be make sense to utilize it further and have my Linux server relay any emails to my cellphone/Blackberry, especially any mdadm monitoring alerts for my RAID-5 array.  However I was having difficulting locating quality documentation configuring relayhost SMTP authentication in sendmail.  It’s a simple setup now with Postfix (and probably sendmail too), but at the time I was running Fedora Core and just switched to the brand-new Warty release (I wasn’t kidding when I said some time ago).

Here are some basic configuration steps.  We will be using mail.myrelayhost.com and testing delivery to bob@aol.com as an example.  I have not tested this with DynDNS relaying in some time now but I see no reason that would prevent it from working if you use their service.  Note: These commands must be run with root permissions via sudo.

Read the rest of this entry »