Categories Archives: Linux

mod_security rule for e107 ‘plugindir’ and ‘ifile’ remote include vulnerability

Here are modsecurity2 rules for the latest string of vulnerabilities affecting the E107 CMS system described in the following links: SecRule ARGS:THEMES_DIRECTORY “^http” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'” SecRule ARGS:ifile “^http” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'” SecRule ARGS:plugindir “^http” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'” SecRule ARGS:author_name “\[php\]” “t:htmlEntityDecode,t:urlDecode,t:lowercase,deny,log,auditlog,msg:’Denied e107 vulnerability'”

Arbitrary MIME support for aacplus streaming with libshout and perl bindings

If you want to be able to support alternative stream types (such as AACplus) using libshout-2.2.2, you’ll need a patch to add a ‘mime’ method. You can then manually set the mime-type for arbitrary stream types. I also included a minor change which sends ‘content-type’ headers to Shoutcast/ICY stream servers, which is required for Shoutcast […]

Decrypting a SSL Server Key for importing into Cpanel

In case someone accidentally encrypts a server key (e.g. not following directions) then expects it to be accepted in to Cpanel, you’ll need to decrypt it first. Most web hosting platforms (like Cpanel) need the server key to be in clear text. The private key can be decrypted with: openssl rsa -in encrypted.pem -out plaintext.key […]

Categories: Linux and Technical. Comments Off on Decrypting a SSL Server Key for importing into Cpanel

Automatically purge old voicemail on Asterisk/FreePBX/Trixbox

Run this nifty Perl script daily or weekly via cron. This will keep your voicemail from overflowing and unknowingly rejecting new voicemail. #!/usr/bin/perl # # Script to expire voicemail after a specified number of days # by Steve Creel # # Directory housing the voicemail spool for asterisk $dir = “/var/spool/asterisk/voicemail”; # Context for which […]

Installing RED5 Server on CentOS

First, download, extract and install: mkdir /usr/local/red5; cd /usr/local/red5 wget tar -zxf red5-0.8.0.tar.gz Install JAVA: wget -O java.rpm.bin chmod 755 java.rpm.bin; ./java.rpm.bin Open new init script: nano -w /etc/init.d/red5 Paste into init script: #!/bin/sh # For RedHat and cousins: # chkconfig: 2345 85 85 # description: Red5 flash streaming server # processname: red5 […]

hostapd init script for Redhat/CentOS

Hostapd is a software daemon that turns a Linux box into a full blown wireless access point, but it doesn’t come with an init script to automatically start it when the machine boots up. It seems each Linux distribution that supports hostapd does their own thing, so I went ahead and created this little init […]

Migrating from Rackspace Cloud to Cpanel

Fed up with cloud hosting? You’re not alone. Just recently, I assisted a mass exodus of over 50 mysql/joomla based sites. After the migration to just a modest dedicated server with Cpanel, MySQL queries improved by 200% on average. Some longer queries and page loading times saw improvement of over 1000%. Additionally, the dedicated server […]