Sunday , 22 January 2017

Home

Log the Total Number of Connections to a Port From an IP Address

Is there any log entries to find-out directly the total number of connections in server? In some high connection high load servers, this log would be helpful to monitor and tune the server with number of connections on it. We can simply sort out the total number of connections in a port by using the command netstat. There isn’t any …

Read More »

How To Install mod_geoip On a WHM/cPanel Server

mod_geoip is an API module released by MaxMind for Apache (or interchangeably, LiteSpeed) to quickly and easily obtain your website visitors’ geographical information. It offers high performance IP lookup especially when used together with PHP. See benchmark While instructions to install mod_geoip on Linux with Apache are easily available on the Internet, not much is written on how to install the module on WHM/cPanel servers. This tutorial will …

Read More »

How to Change & Set the Default crontab Editor

  Most hardcore command line users and unix geeks love vi, but I prefer nano. If you want to change your default crontab editor to nano, here’s how to do this:   For a one time edit, launch the terminal and type: EDITOR=nano crontab -e If you want to set nano as your default editor in general, you use this command: export EDITOR=/usr/bin/nano …

Read More »

Linux / Unix: Sed Substitute Multiple Patterns [ Find & Replace ]

I’m using the date +’%D_%T’ to store Unix system date and time in a shell variable called $_now: _now=”$(date +’%D_%T’)” echo $_now Outputs: 01/20/12_16:10:42 I’d like to replace / and : with _. I’m aware of the following sed command: sed ‘s/\//_/g > s/:/_/g’ <<<“$_now” Outputs: 01_20_12_16_14_09 How do I specify two pattern within the same sed command to replace | and : with …

Read More »

Check Spam on EXIM Mail Server

We can simply find out the details spammers from mail queue itself. Some simple exim commands for check spams are below. First login tho the server via SSH, ssh root@IP then run the following commands exim -bpc This commands shows the total number of mails in the queue. If the result is high(eg:2000) you can confirm spamming. Example [root@EcLinux]# exim …

Read More »

Install eAccelerator on cPanel Server – Command line

What is eAccelerator ? Yes, before going directly to the installation steps, you must have an idea about eAccelerator. As the name indicates, it’s an accelerator for PHP scripts/files on your website. It’s an open source software which is used to increase the loading speed of PHP pages. eAccelerator is a PHP accelerator derived from the MMCache extension for the …

Read More »

Hardening your TCP/IP Stack Against SYN Floods

Denial of service (DoS) attacks launch via SYN floods can be very problematic for servers that are not properly configured to handle them. Proper firewall filtering policies are certainly usually the first line of defense, however the Linux kernel can also be hardened against these types of attacks. This type of hardening is useful for SYN floods that attempt to …

Read More »