Showing posts with label Open Source. Show all posts
Showing posts with label Open Source. Show all posts

Tuesday, May 5, 2009

how to install csf in ubuntu / linux servers!

CSF instllation in ubuntu / linux servers!

CSF is a firewall that can be installed on linux based severs to enhance the security. It can be installed even on a server based on cPanel. It can be configured to find out hacking attempts through ssh etc. Can be used for ip whitelisting and blacklisting.

The csf instllation is quite easy. Just follow the documentation I have given below.

1)Create a folder 'csf'

mkdir csf
cd csf



2)Download the csf into this directory and instal.

wget http://www.configserver.com/free/csf.tgz
tar -xzf csf.tgz
cd csf
sh install.sh

3)Now we need to test whether we have the required iptables modules in the system

perl /etc/csf/csftest.pl

you may get a result like this
======================================================================================
root@humanlinux-desktop:/home/hlinux/Downloads/csf/csf# perl /etc/csf/csftest.pl
Testing ip_tables/iptable_filter...OK
Testing ipt_LOG...OK
Testing ipt_multiport/xt_multiport...OK
Testing ipt_REJECT...OK
Testing ipt_state/xt_state...OK
Testing ipt_limit/xt_limit...OK
Testing ipt_recent...OK
Testing ipt_owner...OK
Testing iptable_nat/ipt_REDIRECT...OK

RESULT: csf should function on this server
=======================================================================================


Don't worry if you cannot run all the features, so long as the script doesn't
report any FATAL errors

4)You should not run any other iptables firewall configuration script. For
example, if you previously used APF+BFD you can remove the combination (which
you will need to do if you have them installed otherwise they will conflict
horribly):

sh /etc/csf/remove_apf_bfd.sh

5)That's it. You can then configure csf and lfd by edit the files
directly in /etc/csf/*, or on cPanel servers use the WHM UI

csf installation for cPanel is preconfigured to work on a cPanel server with all
the standard cPanel ports open.

csf installation for DirectAdmin is preconfigured to work on a DirectAdmin
server with all the standard DirectAdmin ports open.

csf auto-configures your SSH port on installation where it's running on a non-
standard port.

csf auto-whitelists your connected IP address where possible on installation.

You should ensure that kernel logging daemon (klogd) is enabled. Typically, VPS
servers have this disabled and you should check /etc/init.d/syslog and make
sure that any klogd lines are not commented out. If you change the file,
remember to restart syslog.

See the readme.txt file for more information.

Webmin Module Installation/Upgrade:-

To install or upgrade the csf webmin module:

Install csf as above
Install the csf webmin module in:
Webmin > Webmin Configuration > Webmin Modules >
From local file > /etc/csf/csfwebmin.tgz > Install Module


Uninstallation of CSF :( :-

Removing csf and lfd is even more simple:

On cPanel servers:

cd /etc/csf
sh uninstall.sh

On DirectAdmin servers:

cd /etc/csf
sh uninstall.directadmin.sh

On generic linux servers:

cd /etc/csf
sh uninstall.generic.sh


un-installation Completed

ref: http://www.configserver.com/free/csf/install.txt


thanks & regards
tell2humanlinux@gmail.com



Sunday, April 19, 2009

Open Source antivirus - ClamWare .

ClamWin is free, open source antivirus software for Microsoft Windows,(dont worry you can run it on Ubuntu using Wine).I Liked ClamWin because , it is OpenSource and also its PORTABLE. Yes, it has a portable version that can be used from a USB flash drive. Scan baby Scan!!!

some of the features of ClamWin are:

  1. Standalone virus-scanner
  2. Scanning scheduler.
  3. Automatic virus database updates on a regular basis.
  4. Context menu integration for Windows Explorer.
  5. Add-in for Microsoft Outlook.
  6. And is portable that can be used from a USB flash drive :)
  7. Extensions availabe to scan file that are downloaded.
  8. Addin to Microsoft Outlook to remove virus-infected attachments automatically.
  9. Standalone virus scanner and right-click menu integration to Microsoft Windows Explorer

The latest version of Clamwin Free Antivirus is 0.95.1.Please note that ClamWin Free Antivirus does not include an on-access real-time scanner. You need to manually scan a file in order to detect a virus or spyware.ClamWin Free Antivirus is based on ClamAV engine and uses GNU General Public License.



Portable ClamWin on a USB or Removable Drive:

Follow this guide to make your own portable ClamWin

You can take ClamWin Free Antivirus with you on a USB pen drive, CD or DVD

1)Install ClamWin on a host PC with Windows XP or higher

2)Copy all the files from "c:\program files\clamwin" to a "clamwin" folder on a removable drive. unins000.exe and unins000.dat files are not needed

3)Copy the following files:
Microsoft.VC80.CRT.manifest
msvcm80.dll
msvcm80.dll
msvcr80.dll
from "c:\program files\clamwin\bin\Microsoft.VC80.CRT" to the "clamwin\bin" folder on your removable drive.

4)Copy this ClamWin.conf (right-click to Save) file to "clamwin\bin" folder on the removable drive (note Standalone=1 setting)

5)Create the folowing foldres on the removable drive:
"clamwin\log"
"clamwin\db"
"clamwin\quarantine"

6)Copy the database files (main.cvd and daily.cvd) from your database directory on the host PC (default location is "C:\Documents and Settings\All Users\.clamwin\db") to the "clamwin\db" folder on the removable drive.

That's it, you can now run clamwin.exe from clamwin folder on your removable drive.

Notes:
It may take a while to load ClamWin.exe depending on the removable drive speed
If you use ClamWin Free Antivirus on a read-only drive (CD or DVD) your need to burn the latest database before use and won't be able to change preferences.

Tip: Click here to see the list of some portabe softwares.


thanks & regards
tell2humanlinux@gmail.com

Saturday, April 18, 2009

nagios installation steps!


Nagios is a popular open source computer system and network monitoring software application. It watches hosts and services, alerting users when things go wrong and again when they get better.Nagios, originally created under the name NetSaint, was written and is currently maintained by Ethan Galstad, along with a group of developers actively maintaining both official and unofficial plugins.Nagios was originally designed to run under Linux, but also runs well on other Unix variants.Nagios is free software licensed under the terms of the GNU General Public License version 2 as published by the Free Software Foundation.

Download nagios 3.1.0(latest)

As a newbie i decided to install the nagios in my ubuntu 9.04 to monitor my own system services & i succedeed in it. The nagios documentation was pretty simple to follow. But i have written a documentation of my own. This documentaion is for those who are lazy(like me :)) to read whole crap given in the official documentaion.Here i just posted the step by step instllation.

N.B: This is the documentaion for Ubuntu. If need to install on other distros goahead and follow this Documentation.
And use sudo in appropriate places.

Lets begin:

1)Nagios need Apache & gdlibrary to work.

sudo apt-get install apache2 (will install apache 2)

sudo apt-get install build-essential

sudo apt-get install libgd2-xpm

2)Create an Account for nagios

sudo useradd -m nagios ( -m is used to create home if donot exist)

passwd nagios

If you are using server edition do the next step , else skip it and goto a).

/usr/sbin/groupadd nagios
/usr/sbin/usermod -G nagios nagios

a)Create a new nagcmd group for allowing external commands to be submitted through web interfacw. Add both nagios & Apache user to the group.

/usr/sbin/groupadd nagcmd

/usr/sbin/usermod -a -G nagcmd nagios

/usr/sbin/usermod -a -G nagcmd www-data


3)Download nagios & Plugins

mkdir ~/downloads
cd ~/downloads

download the nagios & plugins in this folder(downloads). Extract the package.

wget -c http://osdn.dl.sourceforge.net/sourceforge/nagios/nagios-3.0.6.tar.gz

wget http://osdn.dl.sourceforge.net/sourceforge/nagiosplug/nagios-plugins-1.4.11.tar.gz

Extract the packages:

tar xzf nagios-3.0.6.tar.gz

cd nagios-3.0.6

Run the Nagios configure script, passing the name of the group you created earlier like so:

./configure --with-command-group=nagcmd

Compile the Nagios source code.

make all
make install
make install-init
make install-config
make install-commandmode

4)Don't start Nagios yet, we have to do some more.

Edit the /usr/local/nagios/etc/objects/contacts.cfg config file with your favorite editor and change the email address associated with the nagiosadmin contact definition to the address you'd like to use for receiving alerts.

vi /usr/local/nagios/etc/objects/contacts.cfg

just change the email address you need to receive the alerts.

5)Configure the webinterface.

dont leave the current directory ( ~/downloads/nagios-3.0.6)

make install-webconf

Create a nagiosadmin account for logging into the Nagios web interface. Remember the password you assign to this account - you'll need it later.

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Restart Apache to make the new settings take effect.

sudo /etc/init.d/apache2 reload (restart)

6)Compile and install nagios plugin

Extract the Nagios plugins..

cd ~/downloads
tar xzf nagios-plugins-1.4.11.tar.gz
cd nagios-plugins-1.4.11
Compile and install the plugins.

./configure --with-nagios-user=nagios --with-nagios-group=nagios
make
make install

7)login to your web interface(Browser)

You should now be able to access the Nagios web interface at the URL below. You'll be prompted for the username (nagiosadmin) and password you specified earlier.

http://localhost/nagios/

type the nagiosadmin username & password

Click on the "Service Detail" navbar link to see details of what's being monitored on your local machine. It will take a few minutes for Nagios to check all the services associated with your machine, as the checks are spread out over time

DONE! :)

For detailed instllation documentation refer: here

thanks & regards
tell2humanlinux@gmail.com