Step1. Squid3 install.

apt-get install squid3

Step2. Rename the original squid.conf for backup:

mv /etc/squid3/squid.conf /etc/squid3/squid.conf.back

Step3. Create a new custom file squid.conf:

nano /etc/squid3/squid.conf

and paste the following content:

http_port 3128 transparent
acl localhost src
http_access allow localhost
cache_dir ufs /var/spool/squid3 7000 16 256
auth_param basic program /usr/lib/squid3/squid_db_auth --user userproxy --password parolaproxi --plaintext --persist
auth_param basic children 5
auth_param basic realm This is a welcome message that will me displayed to each user.
auth_param basic credentialsttl 1 minute
auth_param basic casesensitive off
acl db-auth proxy_auth REQUIRED
http_access allow db-auth
http_access allow localhost
http_access deny all

Step4. We will go now to the MySQL and create the database: Continue Reading…

There are several methods to move Linux to another hard disk on the same server.
But I used Unix dump / restore utility to do this …

Step1. First you need a new hard disk partition in the same way as with previous unit (Linux is running on). I usually use the utility ‘fdisk‘.
Let us suppose that the old drive is /dev/sda and a new one is /dev/sdb.
To view the partition table hda please run ‘fdisk-l  /dev/ sda “which should show something like this:

[email protected]:~# fdisk -l /dev/sda

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x0007384e

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1        9330    74936320   83  Linux
/dev/sda2            9330        9730     3212289    5  Extended
/dev/sda5            9330        9730     3212288   82  Linux swap

Step2. After this run ‘fdisk /dev/sdb’ and make the same partitions at it. Interactive mode of fdisk utility is well documented and is very intuitive, so I don’t think it would be difficult to perform partitioning.

After this is done, we should make new filesystems at partitions we’ve created:

mkfs -t ext3 /dev/sdb1
mkswap /dev/sdb2

Step3. Now new hard drive preparation is finished and we can proceed with moving Linux to it. Mount new filesystem and change directory to it:

mount /dev/hdb1 /mnt/hdb1
cd /mnt/hdb1

Step4.  Perform moving by command:

dump -0uan -f – / | restore -r -f

When dump/restore procedures are done we should install boot loader to new HDD. Run ‘grub’ utility and execute in it’s console:

root (hd1, 0)
setup (hd1)


For providing access via PPPoE it is required a PPPoE network access server (NAS) and a subscriber’s unit (PPPoE client).
In this guide as a PPPoE network access server it is used a freeware packet rp-pppoe.

Step1. First we need intenet access and 2 network cards (eth0 – WAN, eth1 – LAN).

vim /etc/network/interfaces

auto lo
iface lo inet loopback
iface eth0 inet static
address #Your public IP address
netmask  #Your subnet mask
gateway    #Your gateway

iface eth1 inet static

Step2. Install ppp daemon:

apt-get install ppp

Step3. Get rp-pppoe from here and install it.


Extract the archive:

Continue Reading…

Saidar is a curses-based application to display system statistics.
The statistics include CPU, processes, load, memory, swap, network I/O and disks I/O.

Saidar uses the library libstatgrab. libstatgrab is a cross-platform library that provides access to statistics on the system that runs it.  The current list of statistics includes CPU usage, memory usage, disk usage, process counts, network traffic, disk I / O, and more.

Step1. Install Saidar on Debian Squeeze:

apt-get install saidar

Step2. Using saidar:

After having installed it, you can type in the command saidar:

[email protected]:~# saidar

For more info you can view the man page using the command : “man saidar”


In the following tutorial  i will explain the installation of the apache2 module “mod_evasive“.
Mod_evasive tracks the number of requests for files on the Apache2  server and blocks the delivery in case a certain limit is reached.

Step1. Install mod_evasive module:

apt-get install libapache2-mod-evasive

Step2. Create the log directory for mod_evasive:

mkdir -p /var/log/apache2/evasive

NOTE: Make sure the www-data user will have access to create logs:

chown -R www-data:root /var/log/apache2/evasive

Step3. Now edit the configuration file for the module 0 located in /etc/apache2/mods-available/mod-evasive.load like this:

vim /etc/apache2/mods-available/mod-evasive.load

After edit the file will look  like this:

LoadModule evasive20_module /usr/lib/apache2/modules/
 <IfModule  mod_evasive20.c>
 DOSHashTableSize 3097
 DOSPageCount 5
 DOSSiteCount 120
 DOSPageInterval 1.5
 DOSSiteInterval 1.5
 DOSBlockingPeriod 10
 DOSLogDir "/var/log/apache2/evasive"

This config seems to be optimal for me.

Step4. Enable the module and restart apache:

a2enmod mod-evasive
 /etc/init.d/apache2 restart


Page 19 of 44« First...10...15161718192021222324...3040...Last »