Random thoughts

FreePBX – Table ‘./asterisk/kvstore’ is marked as crashed and last (automatic?) repair failed

FATAL ERROR FreePBX is Unable to Continue SQLSTATE[HY000]: General error: 144 Table ‘./asterisk/kvstore’ is marked as crashed and last (automatic?) repair failed Trace Back /var/www/html/admin/config.php:318 die_freepbx() [0]: FreePBX is Unable to Continue [1]: SQLSTATE[HY000]: General error: 144 Table ‘./asterisk/kvstore’ is marked as crashed and last (automatic?) repair […]

Read more

Find files in a specific date range in Linux

To find files created between 11/11/2013 and 11/12/2013 in Linux: find . -newermt 2013-11-11 ! -newermt 2013-11-12 -ls

Read more

Manually block an IP address in FreePBX

fail2ban-client status fail2ban-client set asterisk-iptables banip xxx.xxx.xxx.xxx

Read more

Remove all bounce messages from exim queue

Remove all bounce messages from exim queue, in groups of 100: exim -bp |grep ‘<>’ |awk ‘/^ *[0-9]+[mhd]/{print $3}’|xargs -n 100 exim -Mrm

Read more

ConfigServer eXploit Scanner (cxs) upgrade cron

To update CXS every day at 5:15AM: 15 5 * * * /usr/sbin/cxs –upgrade –quiet

Read more

Tools to check for OpenSSL Heartbleed bug

Tools to check for the bug: on your own box: http://github.com/musalbas/heartbleed-masstest/blob/master/ssltest.py online: http://filippo.io/Heartbleed/ (use carefully as they might log what you check) online: http://possible.lv/tools/hb/ offline: http://github.com/tdussa/heartbleed-masstest offline: http://s3.jspenguin.org/ssltest.py offline: http://github.com/titanous/heartbleeder List of vulnerable Linux distributions: http://www.circl.lu/pub/tr-21/  

Read more

Check for vulnerable NTP server

Using NMAP: nmap -sU -pU:123 -Pn -n –script=ntp-monlist [IP/HOSTNAME]

Read more

List top 10 largest MySQL databases in Linux

Run the following command as root to list the top 10 largest MySQL databases in Linux. du -s /var/lib/mysql/* | sort -n| cut -f 2-|xargs -i du -sh {} |tail -10 You may need to change the directory to match your configuration. /var/lib/mysql is the default MySQL […]

Read more

That might take a while

While installing OS X Mavericks on a VPS, I was told that the install had “About 359,183,054 hours and 21 minutes remaining”. Luckily it didn’t really take that long.

Read more

Extract a tarball to a specific folder

tar -zxvf filename.tar.gz -C /path/to/destination

Read more
Page 1 of 41234