Posts

Showing posts from 2010

Intrusion Detection and Prevention Using OSSEC

What is OSSEC? According to OSSEC "It is an Open Source Host-based Intrusion Detection System. It performs log analysis, file integrity checking, policy monitoring, rootkit detection, real-time alerting and active response." Installation on Debian Server I installed on Debian .6.24-19-server, already running web service. Install environment Make sure you have compiler e.g gcc or cc and 'make' already installed in your system, otherwise you will get error message and abort the installation process. root@www:/usr/local/src/ossec-hids-2.4.1# apt-get install gcc Dwonload the latest build from www.ossec.net website Extract into folder and start installation imran@web:~/ossec-hids-2.4.1$ tar -zxvf ossec-hids-2.4.1.tar.gz imran@web:~/ossec-hids-2.4.1$ cd ossec-hids-2.4.1/ Run the installation script; root@web:~/ossec-hids-2.4.1# ./install.sh ** Para instalação em português, escolha [br]. ** 要使用中文进行安装, 请选择 [cn]. ** Fur eine deutsche Installation wohlen Sie [de]. ** Για ε...

Intrusion Detection Service in IPCOP

Intrusion Detection was stopped in my IPCoP, version 1.4.1, a while a go, I tried to start them all three through GUI but Got message fail to start. I loged in in console of Ipcop. I checked the existing version of snort, which was older than latest. r oot@firewall:/etc/snort/rules # snort --version snort: unrecognized option `--version' ,,_ -*> Snort! o" )~ Version 2.6.1.5 (Build 59) '''' By Martin Roesch & The Snort Team: http://www.snort.org/team.html (C) Copyright 1998-2007 Sourcefire Inc., et al. And when tried to start the snort using this command root@firewall:~ # snort -c /etc/snort/snort.conf -l /var/log/snort/ I got error that there is error in line # 38 in exploit.rules file located in /etc/snort/rules/ folder. When I tried to comment the line it gives error on line#39. Solution Replace the existing rules folder with working one. For that I installed the latest snort in my laptop, and check the version. imran@imra...

MyCRM Connector Tool for Google Calendar Error

After installation of " MyCRM Connector Tool", followed the procedure described in manual. The test machine shows successful result when configured Google calander under My Account. But production CRM gives following error. "Fatal error : Call to undefined function curl_init() in /home/path/googlecal/MyCurl.php on line 32" The solution is install php5-curl libraries. root@server:~# sudo apt-get install curl libcurl3 root@server:~# sudo apt-get install php5-curl root@server:~# apt-get install php5 I also restarted the mysql server and apache2 just for precaution, not necessary. Recheck settings after entering my Google email address it worked. Got this message. ****** Get events from meetings Synced successfully. ****** Get events from calls Synced successfully. ****** Get events from tasks Synced successfully.

Daily Backup Using RSYNC

Using these steps your system backup automatically using rsync . Step 1: Generate a Public Key using ssh-keygen at Host machine. root@home:~# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 19:44:5f:1c:92:27:26:25:9b:13:df:dc:89:71:f0:c1 root@home Step 2: Insert the key to authorized_key at host machine root@home:~# cd /root/.ssh/ root@home:/root/.ssh# ls id_rsa id_rsa.pub known_hosts root@home:/root/.ssh# cp id_rsa.pub authorized_keys root@home:/root/.ssh# ls authorized_keys id_rsa id_rsa.pub known_hosts root@home:/root/.ssh# Step 3: Copy the ~/.ssh/authorized_keys file to the remote(back) machine As the backup machine storing backup of several machines, authorized_keys file already exits, just copy the li...

Cloning SugarCRM

Step 1: Clone the sugarcrm Directory There is a script "CopySugarFile.sh" , see script also in bottom. Running the Script, remember you have to provide the paths both source directory and clone directory. root@imran:~# ./sugarclone Missing First Argument: Syntax: copySugarFiles.sh /var/www/html/FROM_SUGAR_DIR /var/www/html/TO_SUGAR_DIR exited with status -1 root@imran:~# ./sugarclone /var/www/sugar /var/www/clone Compressing /var/www/sugar Sugar and saving to /home/imran/sugarFilesFromBackup201001111322.tgz Compressing /var/www/clone Sugar and saving to /home/imran/sugarFilesToBackup201001111322.tgz tar: Cowardly refusing to create an empty archive Try `tar --help' or `tar --usage' for more information. Extracting the /var/www/sugar Sugar tgz to /var/www/clone Sugar directory Script complete. Step2: Clone the Database First Create a new database for Cloning e.g clone Export the sugarcrm database using PHPMyAdmin tool e.g sugarcrm.sql Import the sugarcrm.sql data into ...

SugarCRM Changing Max file Upload Limit

In sugar while uploading a file as attachment to e.g Marketing->Accounts->youraccount->Create Note or Attachment. I tried to upload a file size 20M, it did not attached and no error message as well. Here is to fix this.After doing the following changes, performance of site also improves. Step 1: Change in SugarCRM Go to Admin->System Settings->Advanced change Maximum upload size e.g 41943040 (40M) default was 3000000 (3M) Step 2: Change in php.ini file Login to your server hosting the site, Go to /etc/php5/apache2/php.ini and change the following, Max, limit 40M post_max_size = 40M upload_max_size = 40M max_execution_time = 1000 max_input_time = 60 memory_limit = 128M imran@venus:/var/www/sugar$ sudo nano /etc/php5/apache2/php.ini ;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 100 ; Maximum execution time of each script, in seconds, 30s default max_input_time = 60 ; Maximum amount of time each script may spend pars...