Wednesday , 26 October 2016


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 »

How To Install APF Firewall on Cpanel


Advanced Policy Firewall, or APF, is basically an interface to iptables, which is the standard interface to managing network ports on Linux machines. Interacting with iptables can be complex and error-prone, and APF greatly simplifies working with it. However, APF is still only accessible by ssh. There is no way to make changes in APF through WHM or cPanel. All of the APF configuration files are located in the /etc/apf folder …

Read More »

How to Find and Kill All Zombie Processes


On Unix operating systems, a zombie process or defunct process is a process that has completed execution but still has an entry in the process table, allowing the process that started it to read its exit status. It almost always means that the parent is still around. If the parent exited, the child would be orphaned and re-parented to init, …

Read More »