Tag: UNIX
IPv6
by Nick on Mar.30, 2011, under Administration, E-Mail, Hardware, Security, Software, UNIX 101, Virtualization
So…
It’s been awhile.
Recently, I’ve decided to make sure that all of my servers were IPv6 addressable. This was made infinitely easier by working at a forward thinking ISP. So a quick email to our network admin and bam! IPv6 routed to my vlan!
Now, what to do with it?
Ubuntu Apache2 Auto Config BASH script
by Nick on Jan.12, 2011, under Administration, Software, UNIX 101
Man, I’ve been busy… I’ve recently been promoted to being a System’s Administrator! This has forced me to program a few BASH scripts. This one is for a customer that wants a managed system, but wants to be able to add websites at will. It’s pretty simple, and relies on an existing example.com template. Why example.com? Because I follow RFCs dammit! The template allows me to adjust the Apache specific settings, without recoding the script. A little REGEX here, and a pipe to sed there, some error checking, formatting and a dash of some SUDO magic and voila! The customer doesn’t need to email/call me to add a website. Sure beats paying for a crappy control panel ![]()
SpamAssassin
by Nick on Jun.24, 2009, under E-Mail, News
Spam is the bane of all email servers and services. As I wrote in my email entry, I use Maia, which is a frontend to Amavis, which is a daemon that ties various anti-spam and anti-virus programs together. When I originally set things up, I followed a guide on NEOHAPSIS. That guide was written in Russian, but had English examples. Basically, you set up Amavis, have Postfix route mail to it (it acts as an ESMTP server) and Amavis takes care of the rest. My anti-virus program is ClamAV. It works, it’s fairly painless, and simple. My anti-spam choice, SpamAssassin, was not quite as easy.
SpamAssassin is basically a Perl script, maintained by the Apache group, that incorporates various config scripts to filter out spam. There are several modules that you can incorporate, including DKIM checking, URI scanning and, RBL incorporation. You can customize your scoring of each component, making it very flexible. The default modules include SA-Blacklist, a massive blacklist that should not be used. Ever. Disable it, otherwise you will monopolize the CPU on your server. Maia integrates with SpamAssassin very well, allowing for quarantining, with digests and reminders, statistics on each rule for customization, and end user blacklisting/whitelisting, setting up honeypots, among other options. It’s very useful, effective, and not prone to false positives.
sudo -u
by Nick on Jun.11, 2009, under News, UNIX 101
Sometimes, especially on X.X upgrades, WordPress Automatic Update does not work.
Oh, it claims to work. But it doesn’t. So you have to upgrade manually. Now, a manual upgrade is trivial in WordPress. Just download the zip (or gzipped tar,) unpack it, copy the files, go to the admin interface, and click two buttons.
But what if you have multiple users, who have WordPress in their home directories? Use sudo!
Sudo is a tool that administrators can use to execute commands as root. However, you can also the -u parameter to execute a command as another user.
So, if I put WordPress in a neutral folder, then I can simply do this:
>sudo -u username cp -r wordpress/* /home/username/www/example.com/
Voila! Nice and easy.
I should script this…

