Pace Solutions Blog

Web 2.0, e-Commerce, Joomla, WordPress, Facebook Applications, Drupal, Open Source, CMS, PHP, MySQL, AJAX

Archive for the ‘Linux’ Category

Getting Apache Module List

Friday, July 17th, 2009

As day by day you lost track of your Apache configurations and Apache modules. Here is quick shell/bash command to check which modules are loaded and compiled with your current Apache version.

httpd -l

Output will be something like this:

Compiled in modules:
core.c
mod_authn_file.c
mod_authn_default.c
mod_authz_host.c
mod_authz_groupfile.c
mod_authz_user.c
mod_authz_default.c
mod_auth_basic.c
mod_include.c
mod_filter.c
mod_deflate.c
mod_log_config.c
mod_logio.c
mod_env.c
mod_expires.c
mod_headers.c
mod_unique_id.c
mod_setenvif.c
mod_proxy.c
mod_proxy_connect.c
mod_proxy_ftp.c
mod_proxy_http.c
mod_proxy_ajp.c
mod_proxy_balancer.c
mod_ssl.c
prefork.c
http_core.c
mod_mime.c
mod_status.c
mod_autoindex.c
mod_asis.c
mod_suexec.c
mod_cgi.c
mod_negotiation.c
mod_dir.c
mod_actions.c
mod_speling.c
mod_userdir.c
mod_alias.c
mod_rewrite.c
mod_so.c

How to check DDOS Attack on Server

Saturday, July 4th, 2009

A quick and useful command for checking if a server is under DDOS:

netstat -anp |grep 'tcp\|udp' | awk '{print $5}' | cut -d: -f1 | sort | uniq -c | sort -n

This will list the IPs taking the most amounts of connections to a server.

To check active connections that are open to your server, if this number is more then 800 then you might be having an attack

netstat -n | grep :80 |wc -l

To check against SYN attacks, this number should not be more then 100.

netstat -n | grep :80 | grep SYN |wc -l

Basic Bandwidth & Network Usage Analysis

Friday, July 3rd, 2009

As I was doing my co-worker’s system administrative tasks last month, I always was asked this question why one of client server is having slow speed issues. Well who knows until you check try to solve the problem :)

Few things you can always do to check for bandwidth and network analysis.

Install IPTraf – IPTraf is a console-based network statistics utility for Linux. It gathers a variety of figures such as TCP connection packet and byte counts, interface statistics and activity indicators, TCP/UDP traffic breakdowns, and LAN station packet and byte counts.

yum install iptraf -y

Install vnStat – vnStat is a network traffic monitor for Linux that keeps a log of daily network traffic for the selected interface. vnStat isnt a packet sniffer. The traffic information is analyzed from the /proc -filesystem, so vnStat can be used without root permissions.

cd /usr/local/src
wget http://humdi.net/vnstat/vnstat-1.6.tar.gz
tar -zxvf vnstat-1.6.tar.gz
cd vnstat-1.6
make && make install
vnstat -u -i eth0
vnstat --help

Check Apache connection and always check for DDOS attacks.

If your server is WHM / CPanel configured always check bandwidth usage from WHM / CPanel and do the comparing.

Above will give few ideas whats happening on server, and actually you can come up with solution based on these few basic in house tasks.

Copyright © 2009, Pace Solutions. All rights reserved.
Privacy Policy | Terms of Use | FAQ's | Feedback | Contact Us
www.arslanrauf.com