Hallo liebe Community,
anbei ein kurzes HowTo zur Installation des OSSEC Webinterfaces.
Allerdings erhalte ich hierbei noch eine Fehlermeldung im Webinterface und bin mit meinem Latein am Ende. -->
Wurde gefixxt. Anleitung entspricht dem vorgehen ohne Fehlermeldung und SSL Verschlüsselung!
Vorgehensweise:
Zuerst das OSSEC Web Userinterface (Web UI) herunterladen:
Checksum und Signatur des Paketes überprüfen
OSSEC Web UI Dateien entpacken und in ein Verzeichnis verschieben, auf welches der Webserver Zugriff hat:
Setup-Skript ausgeführen und Usernamen sowie Passwort vergeben
Web Server User (www-data, o.ä.)der OSSEC-Gruppe hinzugefügen
Ermitteln des Users mit
Änderung
Von:
Zu:
Berechtigungen für das tmp-Verzeichnis anpassen und Apache neu starten
vhost_ssl.conf anpassen (Alias setzen und open_basedir einfügen)
vhosts_ssl.conf neu einlesen
Ossec Web User Interface aufrufen über:
Folgende Fehlermeldung tritt auf, wenn die open_basedir Direktive vergessen oder nicht richtig gesetzt wurde:
Viel Spaß damit!
Gruß,
sTaN
anbei ein kurzes HowTo zur Installation des OSSEC Webinterfaces.
Allerdings erhalte ich hierbei noch eine Fehlermeldung im Webinterface und bin mit meinem Latein am Ende. -->
Wurde gefixxt. Anleitung entspricht dem vorgehen ohne Fehlermeldung und SSL Verschlüsselung!
Vorgehensweise:
Zuerst das OSSEC Web Userinterface (Web UI) herunterladen:
Code:
#wget http://www.ossec.net/files/ui/ossec-wui-0.3.tar.gz
Checksum und Signatur des Paketes überprüfen
Code:
# wget http://www.ossec.net/files/ui/ossec-wui-0.3-checksum.txt
# wget http://www.ossec.net/files/ui/ossec-wui-0.3.tar.gz.sig
# cat ossec-wui-0.3-checksum.txt
# md5sum ossec-wui-0.3.tar.gz
MD5 (ossec-wui-0.3.tar.gz) = c79fa486e9a20fb06a517541033af304
# sha1sum ossec-wui-0.3.tar.gz
SHA1 (ossec-wui-0.3.tar.gz) = e00bff680721982ee55295a5292eb4e2a638b820
OSSEC Web UI Dateien entpacken und in ein Verzeichnis verschieben, auf welches der Webserver Zugriff hat:
Code:
# tar -zxvf ossec-wui-0.3.tar.gz
# mv ossec-wui-0.3 /var/www/vhosts/domain.de/httpsdocs/ossec-wui
Setup-Skript ausgeführen und Usernamen sowie Passwort vergeben
Code:
# cd /var/www/vhosts/domain.de/httpsdocs/ossec-wui
# ./setup.sh
Web Server User (www-data, o.ä.)der OSSEC-Gruppe hinzugefügen
Ermitteln des Users mit
Code:
# ps auwx |grep apache | cut -d " " -f 1 | grep -v root | uniq
Code:
# vi /etc/group
Von:
Code:
ossec:x:1001:
Code:
ossec:x:1001:www-data
Berechtigungen für das tmp-Verzeichnis anpassen und Apache neu starten
Code:
# chmod 770 tmp/
# chgrp www tmp/
# /etc/init.d/apache2 restart
vhost_ssl.conf anpassen (Alias setzen und open_basedir einfügen)
Code:
# vi /var/www/vhosts/domain.de/conf/vhost_ssl.conf
Code:
Alias /ossec-wui /var/www/vhosts/domain.de/httpsdocs/ossec-wui/
<Directory /var/www/vhosts/domain.de/httpsdocs>
<IfModule sapi_apache2.c>
php_admin_value open_basedir "/var/www/vhosts/domain.de/httpsdocs:/tmp:/var/ossec"
</IfModule>
<IfModule mod_php5.c>
...
php_admin_value open_basedir "/var/www/vhosts/domain.de/httpsdocs:/tmp:/var/ossec"
</IfModule>
vhosts_ssl.conf neu einlesen
Code:
# /usr/local/psa/admin/sbin/websrvmng -u --vhost-name=domain.de -r -a
Ossec Web User Interface aufrufen über:
Code:
http://domain.de/ossec-wui/
Folgende Fehlermeldung tritt auf, wenn die open_basedir Direktive vergessen oder nicht richtig gesetzt wurde:
Code:
Warning: opendir() [function.opendir]: open_basedir restriction in effect. File(/var/ossec) is not within the allowed path(s): (/var/www/vhosts/domain.de/httpdocs:/tmp) in /var/www/vhosts/domain.de/httpdocs/ossec-wui/lib/os_lib_handle.php on line 94
Warning: opendir(/var/ossec) [function.opendir]: failed to open dir: Operation not permitted in /var/www/vhosts/domain.de/httpdocs/ossec-wui/lib/os_lib_handle.php on line 94
Unable to access ossec directory.
Viel Spaß damit!
Gruß,
sTaN
Last edited by a moderator: