Understanding and Setting CRON

Posted on November 26th, 2006 by Admin.
Categories: Cpanel Hosting, Linux.

Cron allows users to automate repetitive system administration tasks such as Periodic execution of a script, database reorganization, and general file cleanups (such as emptying log files and queues).

While Setting up Crons , have to use below parameters .
* * * * * represents < minute hour date month day>

Minute:- At what minute the commands will run between 0 and 59.
Hour:- At what hour the commands will run between 0 and 23.
Date:- At what date of month the commands will run between 1 and 31.
Month:- At what month the command will run between 1 and 12.
Day:- At which day of week commands will run between 0 and 7 where 0,7 = Sunday.

If you don’t want to specify a value for a field then just place * in that field.

0 comments.

How to Block IPs with APF Firewall

Posted on November 26th, 2006 by Admin.
Categories: Server Security, Linux.

Blocking IPs with APF Firewall1) /etc/apf/apf -d IP Reason
–> The -d flag means DENY the IP address
–> IP is the IP address you wish to block
–> Reason is comments to why the IP is being blocked

Example:

./apf -d 267.14.188.1 TESTING

vi /etc/apf/deny_hosts.rules

Shows the following:

# added 267.14.188.1 on 08/23/05 01:25:55
# TESTING
267.14.188.1

2) pico /etc/apf/deny_hosts.rules

You can then just add a new line and enter the IP you wish to block. Before this becomes active though you’ll need to reload the APF ruleset.

/etc/apf/apf -r

0 comments.

How to Unblock IPs from APF Firewall

Posted on November 26th, 2006 by Admin.
Categories: Server Security, Linux.

Unblocking IPs with APF Firewall through below steps :1) pico /etc/apf/deny_hosts.rules

Find where the IP is listed and remove the line that has the IP.
After this is done save the file and reload apf to make the new changes active.

/etc/apf/apf -r

2) If the IP isn’t already listed in deny_hosts.rules and you wish to allow it, then,

/etc/apf/apf -a IP Reason
–> The -a flag means ALLOW the IP address
–> IP is the IP address you wish to allow
–> Reason is comments to why the IP is being unblocked
Example:

./apf -a 267.14.188.1 Reason

pico /etc/apf/allow_hosts.rules

# added 267.14.188.1 on 09/15/06 03:12:50
# UNBLOCKING
267.14.188.1

0 comments.

Installing and Configuring APF Firewall on Linux Server

Posted on November 26th, 2006 by Admin.
Categories: Server Security, Linux.

cd /usr/local/src
wget http://rfxnetworks.com/downloads/apf-current.tar.gz
tar -zxf apf-current.tar.gz
cd apf-0.*
./install.sh

Now edit config file
vi /etc/apf/conf.apf

Scroll down to the “Common ingress (inbound) TCP ports section. At this point you need to find the correct configuration for your control panel.

IG_TCP_CPORTS=”20,21,22,25,26,53,80,110,143,443,465,993,995,2082,2083,2086,2087,2095,2096″
IG_UDP_CPORTS=”21,53,873″

EGF=”1″
EG_TCP_CPORTS=”21,22,25,26,27,37,43,53,80,110,113,443,465,873,2089″
EG_UDP_CPORTS=”20,21,37,53,873″

save the file
start apf
apf -s

If everything still works then edit the config file and turn dev mode off. Make sure you can start a new ssh session before changing dev mode off. If you are kicked out you need to go back and look at what caused the problem!
DEVEL_MODE=”0″

restart APF
apf -r

0 comments.

Cpanel License issue

Posted on November 25th, 2006 by Admin.
Categories: Cpanel Hosting.

If you are getting Cpanel license expired page then check out below 2 things ..
1. Run /usr/local/cpanel/cpkeyclt on server
2. Verify at http://layer1.cpanel.net/verify

0 comments.

How to Compile Linux Kernel

Posted on November 24th, 2006 by Admin.
Categories: Server Security, Linux.

Below are steps to compile Linux Kernel …

cd /usr/local/src/
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.11.12.tar.bz2
wget http://grsecurity.net/grsecurity-2.1.6-2.6.11.12-200506141713.patch.gz
tar xvfj linux-2.6.11.12.tar.bz2
gunzip grsecurity-2.1.6-2.6.11.12-200506141713.patch.gz
patch -p0 < grsecurity-2.1.6-2.6.11.12-200506141713.patch
cd linux-2.6.11.12
make clean
make mrproper
cp /boot/config-’uname -r’ .config
make oldconfig
make menuconfig
make dep
make modules_install
make install
grubby –bootloader-probe
pico /etc/grub.conf
grub-install /dev/hda
cat /boot/grub/device.map
shutdown -r now

0 comments.

Major 352 Linux Distributions

Posted on November 23rd, 2006 by Alex P..
Categories: Linux.

There are more than 352 Linux Distributions till now which are all Open Source and Free .It also include some BSD and UNIX systems but they are also all open source and free. More information can be found at http://www.gridter.com/linx/linux.html .

0 comments.