My monitrc configuration file to monitor apache2, nginx, mysql, sshd, fail2ban, pureftpd, munin-node, postfix, amavisd-new, courier, cron and rsyslogd on my Debian 7 server.

Read the rest of this entry »

Linphone is an internet phone or Voice Over IP phone (VoIP).
I installed this in my Debian wheezy but i found that the debian package does not support TLS beacause of some license restriction.
So i tried to fix it.

aptitude install linphone

Read the rest of this entry »

I wanted to import a big sql file to a remote Mysql Host. The phpmyadmin wasn’t very friendly because the max upload file size supported was 15mb. So i used the following


When i tried to login to a wordpress admin page i get banned from OSSEC.
I searched the logs and found various
suhosin[4348]: ALERT - script tried to increase memory_limit to 268435456 bytes which is above the allowed value
The solution was simple. I put
define('WP_MAX_MEMORY_LIMIT', '128M');
in wp-config.php

I use the following periodically to see if i have some big files on my /var/log/ directory

# find all big files over 1 MB in /var/log and sort them with size
find /var/log -type f -size +1M -exec ls -lh {} \; 2&gt; /dev/null | awk '{ print $NF ": " $5 }' | sort -nk 2,2

and to move all gzipped files from /var/log/ to /var/backuplog/ and make some clean space

find /var/log -iname '*.gz' -exec mv '{}' /var/backuplog/ \

This is a collection of commands i found on the net and wrote them on a executable file to monitor connections on my server

echo "List count of number of connections the IPs are connected to the server using TCP or UDP protocol."
netstat -ntu | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n ;

echo "How many active SYNC_REC are happening on the server.Less than 5 is OK."
netstat -n -p|grep SYN_REC | wc -l

echo "List out the all IP addresses involved."
netstat -n -p | grep SYN_REC | awk '{print $5}' | awk -F: '{print $1}'

echo "List out the all connections to port 80."
netstat -n -a -p|grep :80

echo "Which ip's are having more connection to 80 port."
netstat -anp | grep :80 | awk '{print $5}' | sort | uniq -c | sort -n

In debian squeeze and wheezy you can easily reduce Amavisd-new memory usage by adding

$max_servers = 1;

in your