Intrusion Detection: Snort (IDS), OSSEC (HbIDS) And Prelude (HIDS) On Ubuntu Gutsy Gibbon - Page 3
Part 3 : Installing And Configuring OssecFirst of all we will download and unpack the ossec source: cd /src cd ossec-hids-xx CPRELUDE=-DPRELUDE -lprelude -pthread -lgcc_s -L/usr/lib -lprelude -lgnutls -lgcrypt -lrt -ldl The majority of this HOWTO is taken directly from the Installation Manual for OSSEC-HID which is a very easy to follow manual. If you run into trouble please look at the manual first as it will always have the most up to date information. Now the easy part. Ossec comes with an install script install.sh which does all of the hard work for us. cd .. Pick what language you want to read everything in and hit enter. ** Para instalação em português, escolha [br]. Next it is going to warn us that we need a C compiler on the machine, and give you some general information about your computer (kernel version, user and host). Go ahead and hit enter likes it says. You are about to start the installation process of the OSSEC HIDS. Next select a local install: 1- What kind of installation do you want (server, agent, local or help)? local <enter> Now choose were you want to install it. Use the default or change it if you want to. This howto however will assume the default location. Choose where to install the OSSEC HIDS [/var/ossec]: <enter> Now select you notification options. You can choose answers used in this howto or different ones. I would recommend setting "Y" to everything. Active responses are really nice. It will set some default configuration variables based on your answers and certian things it finds on your system. 3- Configuring the OSSEC HIDS. Now it will compile everything. This shouldn't take too long to complete. It only took around 1-2 minutes for my box. After it is completed press enter to finish. - Unknown system. No init script added. Now unfortunately it doesn't detect Ubuntu so it will not create an init script. This is simple enough to take care of. (Yes, its basic. If you want to improve it please feel free to do so) Copy and paste the following into /etc/init.d/ossec: #!/bin/sh
case "$1" in
start)
/var/ossec/bin/ossec-control start
;;
stop)
/var/ossec/bin/ossec-control stop
;;
restart)
$0 stop && sleep 3
$0 start
;;
reload)
$0 stop
$0 start
;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac
Now make it executable: chmod +x /etc/init.d/ossec Add it to our runlevels so it starts on boot: update-rc.d ossec defaults ossec.conf/var/ossec/etc/ossec.confossecprelude:<global> ... <prelude_output>yes</prelude_output> </global> Finally we'll add ossec as an agent in prelude: prelude-adduser registration-server prelude-manager On the management server do: prelude-adduser register OSSEC "idmef:w" localhost --uid ossec --gid ossec Note: The sensor name MUST be in uppercase > OSSEC. Start the ossec with init.d script powered by OSSEC (1.4 version should now detect ubuntu/debian OS and the init script will work!) or RShadow script. If you see this you'r up and running. Starting OSSEC HIDS v1.4 (by Daniel B. Cid)... Now go to the url where you installed prewikka, and login with the user admin and password admin. Change this password immediately in order to prevent unauthorized access.
|




print: 
Recent comments
3 hours 16 min ago
14 hours 6 min ago
15 hours 6 min ago
16 hours 35 min ago
18 hours 23 min ago
20 hours 24 min ago
22 hours 2 min ago
23 hours 1 min ago
1 day 1 hour ago
1 day 1 hour ago