Ad Ad Ad Ad

Block a Range of Ip Address Using IP Tables

In some cases we can seen that there is attack coming to our server from a particular range of ip, in that case we need to block only that range not the full range. In that situtation we can use iptables
Example: If attack is coming from 202.10.100.20 to range of …

This Site For sale

This domain for  sale… Please contact riyesh@gmail.com

Prevent image hotlinking

Hotlinking is the use of a linked object, often an image, from one site into a web page belonging to a second site. The second site is said to have an inline link to the site where the object is located.
It is always recommended to enable hotlinking of images, else …

kernel compilation

Kernel 
 It makes sure that all processes in the system works fine
Rebuilding

It is done to optimize the kernel to suit our requirements as well as make it more secure from internet attacks
 Steps

1. Determining the current hardware 
 This is required during configuration process to enable hardwares that our new kernel has to support.
Commands …

Enable/ disable ping requests in linux

 Ping Requests use ICMP protocols. This is enabled/disabled using sysctl values.
To Disable Ping:
 
echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all
 
To Enable Ping:
 
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

SSH login using Public/Private key authentication

 Scenario
To log into “Server A” from “Server B” without using passwords. Users for both the server will be “root”
Process

 Login to “Server B” as root user and generate key for the root user. No need to enter any passphrase while generating this key.

ssh-keygen -t rsa
 
Once the key is generated, copy the …

Nagios installation

Nagios is the new name for NetSaint, a network/service monitoring tool. It was designed for Linux, but can be compiled and run perfectly well under any UNIX variant as far as I am aware. The monitoring daemon runs intermittent checks on hosts and services you specify.Nagios can send report through …

Upgrading kernel

Upgrading kernel
Situation
the existing kernel was 2.4 and the required one is 2.6

cd /usr/local/src
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.1.tar.gz
tar -zxf linux-2.6.20.1.tar.gz
cd linux-2.6.20.1

Now we need to copy the existing   kernel configuration file 

cp /boot/config-2.4.22-1.2199.nptlsmp /usr/local/src/linux-2.6.20.1/.config

Now we need to configure the kernel using this configuration file .. for that use
 

make oldconfig

You can see a lot of new  features for …

Server monitoring script!

Please do  this script on your own risk, first test this script on test machine. then do it on live server 
 
 
#!/bin/bash
EMAIL=”riyesh@linuxbuddies.com”
SUBJECT=”Alert $(hostname) load average is $L05?
TEMPFILE=”/tmp/$(hostname)”
echo “Load average Crossed allowed limit.” >> $TEMPFILE
echo “Hostname: $(hostname)” >> $TEMPFILE
echo “Local Date & Time : $(date)” >> $TEMPFILE
echo “| Uptime status: |” >> …

ubuntu internet sharing

 The following will explain how to share your Internet connection:
Note: Type all the following commands in a root terminal, DO NOT use sudo.
1. Start by configuring the network card that interfaces to the other computers on you network:
# ifconfig ethX ip 
where ethX is the network card and ip is your …

 Page 1 of 2  1  2 »