How to find the default gateway on Linux

May 2, 2011

Whether you are troubleshooting network problems or trying to set up a VPN…, knowing what address your computer has configured as the default gateway is always useful. Running a simple command from the terminal can give you this. root@lifelinux:~# route -n Sample outputs: Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface […]

Read more →

How to disable ICMP echo responses in Linux

May 2, 2011

Many malicious attacks begin with a ping scan. Disabling ICMP echo requests prevents your system’s discovery with a ping. Disable ICMP echo responses temporarily You can temporarily disable the ICMP using the following method but this setting will be erased after the reboot. root@lifelinux:~# echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Read more →

How to backup and restore large mysql database

May 1, 2011

If you have very large mysql database then it is very hard to backup and restore using the conventional phpmyadmin or any other programs. In this Tutorial I will explain you how to backup and restore a larger database. This tutorial can be used while moving your database from one server to another.

Read more →

Using yum command on CentOS / RedHat

April 30, 2011

yum is an interactive, automated update program which can be used for maintaining systems using rpm. Synopsis yum [options] [command] [package …]

Read more →

Display motherboard information on Linux

April 25, 2011

Dmidecode reports information about your system’s hardware as described in your system BIOS according to the SMBIOS/DMI standard (see a sample output). This information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details of varying level of interest and reliability depending on the manufacturer. […]

Read more →

Linux Random Password Generator With Bash Script

April 24, 2011

#!/bin/bash # Under RedHat / Centos if [ $# -gt 0 ] then MIN=$1 else MIN=8 fi DEL=`expr $RANDOM % 5` LEN=`expr $MIN + $DEL` cat /dev/urandom | tr -dc “a-zA-Z0-9@#*=[]” | dd bs=$LEN count=1 2>/dev/null echo;

Read more →

How to install IPTables on RedHat / Centos Linux

April 24, 2011

iptables is a user space application program that allows a system administrator to configure the tables provided by the Linux kernel firewall (implemented as different Netfilter modules) and the chains and rules it stores. Different kernel modules and programs are currently used for different protocols; iptables applies to IPv4, ip6tables to IPv6, arptables to ARP, […]

Read more →