Squid is used by hundreds of Internet Providers world-wide to provide their users with the best possible web access. Squid optimises the data flow between client and server to improve performance and caches frequently-used content to save bandwidth.

Squid can also route content requests to servers in a wide variety of ways to build cache server hierarchies which optimise network throughput.

Step 1. Install  Squid

apt-get install squid

Step 2. Allow your network to use the proxy server.

Append lines similar to these to your config. Continue Reading…

Ipcalc is a simple tool to calculate network, broadcast, netmask, etc. from an IP address.

It also gives the class of the IP. It might facilitate the work of network admins.

Here is an example of using it against a “local” IP address:

Example 1:

Deb:~# ipcalc 192.168.4.25
Address: 192.168.4.25 11000000.10101000.00000100. 00011001
Netmask: 255.255.255.0 = 24 11111111.11111111.11111111. 00000000
Wildcard: 0.0.0.255 00000000.00000000.00000000. 11111111
=>
Network: 192.168.4.0/24 11000000.10101000.00000100. 00000000
HostMin: 192.168.4.1 11000000.10101000.00000100. 00000001
HostMax: 192.168.4.254 11000000.10101000.00000100. 11111110
Broadcast: 192.168.4.255 11000000.10101000.00000100. 11111111
Hosts/Net: 254 Class C, Private Internet

Continue Reading…

I’ll show you a simple script for easily monitor server



#!/bin/bash
# Monitoring Server with ping

########################################################

# host/ip
HOST="debian-tutorials.com"

# NO ping request
COUNT=3

# Report
SUBJECT="Server Down!"
EMAIL="[email protected]"
for host in $HOST

do
count=$(ping -c $COUNT $HOST | grep 'received' | awk -F',' '{ print $2 }' | awk '{ print $1 }')

  if [ $COUNT -eq 0 ]; then
# Server is DOWN!

    echo "Host : $HOST is down (ping failed) at $(date)" | mail -s "$SUBJECT" $EMAILID
  fi
done

No comment …

Valic —  June 5, 2010 — Leave a comment

It seems that someone got very upset when an article that we found useful and interesting got included on this website.

We chose to remove it to avoid future inconveniences.

From now on all the articles posted on this website will be 100% created by us preventing this kind of situations from ever happening again.

Sorry for the inconveniences created.

Linux machines are known to be pretty secure.

Studies have shown that Linux has been designed in a secure manner. Yet, despite all the security features that come bundled with a Linux installation, you need to configure these features correctly to make them work for you. I’ll guide you through the process of setting up of one of the tools that help secure your machine – the firewall. We will use the iptables firewall for this exercise. I am assuming that you are using a server running Red Hat Enterprise Linux 4 or similar. However, most of the steps should work fine on other Linux distributions as well. In this article we will setup a firewall on a Linux server running the Apache Web Server, FTP, and SSH.

Let us first see what ports these applications use and which of them need to have a port open on the firewall.

The Apache web server runs on port 80 by default. Apache is going to server all our web content on this port, therefore we need to keep this port open on the firewall. The SSH service runs on port 22. We need to be able to remotely connect to our server to work, so we keep it open. FTP runs on port 21 and it too needs the port to be open to communication.

Next, make sure you have iptables installed. Run this command as the root user:

apt-cache search iptables Continue Reading…