How can I enable or setup log message in the iptables firewall?

November 14th, 2010 by upa_kid 
Linux firewall, iptables has the capability to log network activity to the syslog system. This is very useful to detect problems as well as to generate reports of network activity. You can also use this to detect all intrusion detection or unwanted incoming/outgoing connections etc. LOG module To enable logging option you need to use LOG iptables/kernel module. It turn on kernel logging of matching...

How do I sync data between two Load balanced Linux / UNIX servers?

November 14th, 2010 by upa_kid 
Load balancing is way to provide to handle the load of the large number of visitors particular website or network service receives. It helps provide redundancy to your website. There are several ways to accomplish load balancing: * Use of Linux Virtual Server * Use of layer 4 routers * Round robin DNS with squid cache * Proprietary clustering solution from vendor such as Microsoft or HP/IBM, Cisco,...

How do I stop a Linux kernel module from loading automatically?

November 14th, 2010 by upa_kid 
A module (device driver) is causing Linux server to hang, so we replace Ethernet card with Intel LAN card. The old module still gets loaded. It is causing problem. So I decided to turn off module forever (I am not going to recompile kernel to get rid of this shity module). The Linux kernel v2.6.xx queries /etc/modules.conf file to load modules for hardware device (old 2.4.xx version uses /etc/modprobe.conf...

How do I sync data between two Load balanced Windows 2003 servers?

November 14th, 2010 by upa_kid 
For UNIX/Linux server you can use rsync command to keep data sync’d between two servers. rsync also works under Windows NT/2003 server but it will take lots of time to setup. For Microsoft Windows 2003 server use robocopy tool, to sync files between two windows server. You can download robocopy.exe and other files from Windows 2003 Resource Kit Tools set. Once tool is downloaded, install the...

How Do I Enable Remote Access To MySQL Database Server?

November 14th, 2010 by upa_kid 
By default remote access to MySQL database server is disabled for security reasons. However, some time you need to provide remote access to database server from home or a web server. MySQL Remote Access You need type the following commands which will allow remote connections. Step # 1: Login Using SSH (if server is outside your data center) First, login over ssh to remote MySQL database server: ssh...

Can I use SSL certificate for my sub domains as well?

November 14th, 2010 by upa_kid 
Some time customer/clients are not a technical expert, especially one in a managerial or administrative position. They will make some wrong decision and as tech support executive, you will get pissed off. Someone ordered SSL cert for www.domain.com and now if you want to work it for order.domain.com. It will not work as SSL certificate are domain specific. For example, SSL certificate issued for domain...

How do I Find Out Linux CPU Utilization?

November 14th, 2010 by upa_kid 
Whenever a Linux system CPU is occupied by a process, it is unavailable for processing other requests. Rest of pending requests must wait till CPU is free. This becomes a bottleneck in the system. Following command will help you to identify CPU utilization, so that you can troubleshoot CPU related performance problems. Finding CPU utilization is one of the important tasks. Linux comes with various...

How do I find out if my Linux server CPU can run a 64 bit kernel version (apps) or not?

November 14th, 2010 by upa_kid 
It happens many times. Often new Linux system administrators and user(s) get confused. They are not able to determine if Linux system can run a 64 bit kernel version (and application) or not. There is simple way to find out: (a) Ask your hardware vendor (b) Find out yourself by reading manuals (c) Or run the following commands: Here is output from one of my production Dual Opteron server: $ less /proc/cpuinfo Output: processor...

How do I save (recover) data from crashed disks with dd and ddrescue command?

November 14th, 2010 by upa_kid 
dd_rescue (also known as ddrescue) is a program that copies data from one file or block device to another, it is a tool to help you to save data from crashed partition. It tries to read and if it fails it will go on with the next sectors, where tools like dd will fail. If the copying process is interrupted by the user it is possible to continue at any position later. It can copy backwards. Install...

How do I find out that who are connected to my Windows based web server?

November 14th, 2010 by upa_kid 
MS-Windows server offers two ways to find out current number of connection to web service. You can use netstat command, which will list connection for port 80. Click on start > Run > And type command cmd > At command prompt type command: c:> netstat To get help on netstat command type command: c:> netstat /? However Microsoft also offers current connections performance object tool....

How do I find out Linux Resource utilization to detect system bottlenecks?

November 14th, 2010 by upa_kid 
Q. How can I find out Linux Resource utilization using vmstat command? How do I get information about high disk I/O and memory usage? A. vmstat command reports information about processes, memory, paging, block IO, traps, and cpu activity. However, a real advantage of vmstat command output – is to the point and (concise) easy to read/understand. The output of vmstat command use to help identify...

How do I Drop or block attackers IP with null routes?

November 14th, 2010 by upa_kid 
Someone might attack on your system. You can drop attacker IP using IPtables. However, you can use route command to null route unwanted traffic. A null route (also called as blackhole route) is a network route or kernel routing table entry that goes nowhere. Matching packets are dropped (ignored) rather than forwarded, acting as a kind of very limited firewall. The act of using null routes is often...