How to configure IPSec/L2TP VPN server in CentOS 6

I had to look for an alternate VPN system to use when I need to dial back to my home network while on the move to access my media library or when I require a trusted connection or a whitelisted IP.

The next best thing (and least complicated to set up going from PPTP) is IPSec/L2TP, which has built-in support in most current operating systems (including Windows, Linux and Android). Due to its double-encapsulation nature (L2TP performs the tunnelling of data and IPSec provides the encrypted channel), L2TP/IPSec has a more complex setup and configuration procedure, both for the server and the client.

Automatically restart Webmin/Virtualmin in case of failure

Running out of memory sometimes happens on swap-less VPSes, and it seems Webmin (together with its twin, Virtualmin) are among the first processes to die in out-of-memory cases.

Setting up a little script to check for and restart Webmin if it is no longer running is a pretty simple (workaround) solution – but should never replace the proper procedure of adjusting the settings or upgrading the VPS to avoid running out of memory in the future.

Fixing Postfix authentication issues on CentOS 6 with Virtualmin

The weirdest errors are those occurring on a freshly installed system where you’d expect for everything to simply work (with the default configs). But such new installs rarely work.

Roudcube successfully connects and sends emails through localhost. At the same time, external clients are unable to send emails through SMTP. The issues is…

Recover from a broken rpmdb and missing rpm/Packages in CentOS

One can never have too many backups. There’s always room for one more backup. Backups are what keep computers running (most of the time)… Except when backups are not set up. At all. Not even a single antiqued copy exists of what broke down…

Let’s imagine that worst case scenario. Let’s imagine…

SpamAssassin fails to start on CentOS 5.10

If you’re still running a CentOS 5.10 machine, you may notice that after recent updates SpamAssassin no longer works on your system. Trying to start it manually will get you a puzzling error:

Starting spamd: child process [12345] exited or timed out without signaling production of a PID file: exit 255 at /usr/bin/spamd line 2588.

Manually running sa-update also triggers an error (albeit more detailed)…

Handling processes / services on hibernation / wakeup in CentOS

Hibernation is a great feature on any computer. It allows for a temporary pause in execution in which the system in question can be unplugged, cleaned, modified, or moved.

But what happens when some services don’t play nice and fail to resume properly from sleep? Fortunately, Linux’s power management utilities provide the necessary functionality…

Restarting USB subsystem in CentOS

After a long uptime specific (cheap) devices or components connected to the USB ports lock up or malfunction. Unplugging and plugging them usually fixes issues, but physical access to the system (especially a remote server) is neither always possible or desirable.

In cases like this, Linux (unlike Windows) can trigger a USB subsystem restart by deactivating and reactivating the USB controller(s).