Ninja – Gui alternativa per Nagios

Posted by Cristian | Posted in Nagios | Posted on 11-01-2011

0

Ninja è una gui alternativa per nagios a mio avviso veramente ben fatta, l’ho installata su di un server Linux Ubuntu e dopo qualche aggiustamento ora va alla grande.

op5-ninja

Il sito del progetto dove trovare tutte le informazioni necessarie è questo www.op5.org

Backup e Restore websites e application pool su IIS6

Posted by Cristian | Posted in Backup | Posted on 20-12-2010

0

Così eseguo il backup

  1. Apro il pompt dei comandi: cmd
  2. Mi posiziono nella directory “C:\WINDOWS\system32\inetsrv”
  3. Eseguo il seguente comando: iisback /backup /b Mio-file-di-Backup
  4. Conservo il file generato che inizia con Mio-file-di-Backup

Così eseguo il restore

  1. Apro il pompt dei comandi: cmd
  2. Mi posiziono nella directory “C:\WINDOWS\system32\inetsrv”
  3. Eseguo il seguente comando: iisback /restore /b Mio-file-di-Backup

la procedura viene descritta nel dettaglio sul sito microsoft:
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/5e7e923c-b374-4872-a8f5-da85ec1315fd.mspx?mfr=true

Individuare vulnerabilità su webserver con Nikto

Posted by Cristian | Posted in Apache2, Sicurezza IT - Hacking | Posted on 09-12-2010

0

Nikto è un tool di vulnerability assessment open source scritto in perl. E’ molto utilizzato e mi sembra anche molto efficare per testare siti web che utilizzano codice commerciale/pubblico (ad esempio cms).

sito ufficiale da dove scaricare il tool cirt.net/nikto2

test da me effettuato con nikto:
perl nikto.pl -C all -h [l'ip dell'host non ve lo dico] -p 80

Risultato:
- Nikto v2.1.3
—————————————————————————
+ Target IP:          [ip dell'host non ve lo dico]
+ Target Hostname:    [url-del-sito-che-non-vi-dico.com]
+ Target Port:        80
+ Start Time:         2010-12-09 17:13:05
—————————————————————————
+ Server: Apache
+ OSVDB-3268: /icons/: Directory indexing found.
+ OSVDB-3233: /icons/README: Apache default file found.
+ 6417 items checked: 0 error(s) and 2 item(s) reported on remote host
+ End Time:           2010-12-09 17:33:05 (41 seconds)


Soluzione:

visto che non avevo bisogno di questo alias, ho preferito lasciarlo ma ne ho impedito l’accesso modificando il file alias.conf come segue:

vim /etc/apache2/mods-available/alias.conf

Prima
<Directory “/usr/share/apache2/icons”>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
</Directory>


Dopo
<Directory “/usr/share/apache2/icons”>
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Deny from all
</Directory>

(avrei anche potuto commentare tutto a partire da Alias /icons/ “/usr/share/apache2/icons/” …)

ed ho fatto ricaricare la configurazione ad apache

/etc/init.d/apache2  reload

Scoraggio l’utilizzo di questo software su siti web/webserver altrui.

ANR2968E Database backup terminated. DB2 sqlcode: -2033

Posted by Cristian | Posted in Backup | Posted on 24-11-2010

0

lanciando il comando ba db t=f devc=lto_dc wait=yes che dovrebbe permettere di fare il backup del database di Tivoli TSM Server ho avuto in risposta questo errore:

ANR0984I Process 2 for DATABASE BACKUP started in the FOREGROUND at 18:35:28.
ANR2280I Full database backup started as process 2.
ANR2968E Database backup terminated. DB2 sqlcode: -2033. DB2 sqlerrmc: 168.
ANR0985I Process 2 for DATABASE BACKUP running in the FOREGROUND completed with
completion state FAILURE at 18:35:29.
ANS8001I Return code 4.

visto che magari a qualcuno può essere utile ho trovato la soluzione sul sito IBM all’indirizzo che segue:
http://www-01.ibm.com/support/docview.wss?uid=swg21390301

Suddivisione subnet mask

Posted by Cristian | Posted in Mix | Posted on 10-11-2010

0

 addrs bits pref   mask             

     1   0  /32    255.255.255.255
     2   1  /31    255.255.255.254
     4   2  /30    255.255.255.252
     8   3  /29    255.255.255.248
    16   4  /28    255.255.255.240
    32   5  /27    255.255.255.224
    64   6  /26    255.255.255.192
   128   7  /25    255.255.255.128
   256   8  /24    255.255.255
   512   9  /23    255.255.254
   1 K  10  /22    255.255.252
   2 K  11  /21    255.255.248
   4 K  12  /20    255.255.240
   8 K  13  /19    255.255.224
  16 K  14  /18    255.255.192
  32 K  15  /17    255.255.128
  64 K  16  /16    255.255
 128 K  17  /15    255.254
 256 K  18  /14    255.252
 512 K  19  /13    255.248
   1 M  20  /12    255.240
   2 M  21  /11    255.224
   4 M  22  /10    255.192
   8 M  23  /9     255.128
  16 M  24  /8     255
  32 M  25  /7     254
  64 M  26  /6     252
 128 M  27  /5     248
 256 M  28  /4     240
 512 M  29  /3     224
1024 M  30  /2     192            

hosts   subn/c  subn/c  subn/b  subn/b  bits hex-mask dec-mask
                strict          strict

    2     64      62    16384   16382     2  fffffffc 255.255.255.252
    6     32      30     8192    8190     3  fffffff8 255.255.255.248
   14     16      14     4096    4094     4  fffffff0 255.255.255.240
   30      8       6     2048    2046     5  ffffffe0 255.255.255.224
   62      4       2     1024    1022     6  ffffffc0 255.255.255.192
  126      2       0      512     510     7  ffffff80 255.255.255.128
  254                     256     254     8  ffffff00 255.255.255.0
  510                     128     126     9  fffffe00 255.255.254.0
 1022                      64      62    10  fffffc00 255.255.252.0
 2046                      32      30    11  fffff800 255.255.248.0
 4094                      16      14    12  fffff000 255.255.240.0
 8190                       8       6    13  ffffe000 255.255.224.0
16382                       4       2    14  ffffc000 255.255.192.0
32766                       2       0    15  ffff8000 255.255.128.0

Merlin ERROR 1045

Posted by Cristian | Posted in Nagios | Posted on 01-11-2010

0

root@my-server:/home/smemorando/merlin-0.6.8# sh install-merlin.sh –dest-dir=/usr/local/nagios/addons/merlin \
>            –nagios-cfg=/usr/local/nagios/etc/nagios.cfg \
>                    –db-type=mysql –db-user=merlin –db-pass=merlin \
>                    –db-name=merlin
  Database settings:
    Type     (–db-type): mysql
    Name     (–db-name): merlin
    Username (–db-user): merlin
    Password (–db-pass): merlin
 
  Path settings:
    Nagios config file  (–nagios-cfg): /usr/local/nagios/etc/nagios.cfg
    Destination directory (–dest-dir): /usr/local/nagios/addons/merlin
    Base root                 (–root):
 
  Installing the following components: db,files,config,init
Does this look ok? [Y/n] y
 
Installing
 
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
install-merlin.sh: 302: [[: not found
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)
Failed to setup database.
Aborting.
 
Solutione: impostare la password dell’utente root su mysql vuota ed ultimata l’installazione reimpostarla

Email all’accesso di root

Posted by Cristian | Posted in Script Bash | Posted on 31-10-2010

0

vim /root/.bashrc

## aggiungo alla fine

echo ‘Notifica di accesso con utente ROOT al sistema XXXX avvenuto il giorno (‘ `date -R` “) e proveniente dall’indirizzo ip “`who | cut -d”(” -f2 | cut -d”)” -f1` | mailx -s “Alert NOME-SERVER: Accesso con utente Root dall’ip  `who | cut -d”(” -f2 | cut -d”)” -f1`” indirizzo-email@dominio.xx

se sul mio sistema è installato postfix cambio le righe del suo file di configurazione come segue.

il mio /etc/postfix/mail.cf è stato modificato così:
# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA’s job.
append_dot_mydomain = no

# Uncomment the next line to generate “delayed mail” warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = my-server
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost = 111.111.111.111 ## indirizzo relay di posta
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

mod_tls/2.1.2: unexpected OpenSSL error, disconnecting

Posted by Cristian | Posted in Work in progress | Posted on 21-09-2010

0

nel mio caso è stato sufficiente riavviare proftpd, effettuando l’aggiornamento alla versione successiva il problema non dovrebbe più ripresentarsi… a voi la scelta

CHECK_NRPE: Error – Could not complete SSL handshake.

Posted by Cristian | Posted in Nagios | Posted on 15-09-2010

0

1) Installare nagios-nrpe-server
2) verificare che il processio sia avviato con netstat -an | grep nrpe,
3) Lanciare sul server Nagios  /usr/local/nagios/libexec/check_nrpe -H 10.0.0.9

se viene restituito l’errore seguente
CHECK_NRPE: Error – Could not cocmplete SSL handshake.

4) editare il file di configurazione di nrpe sul nodo da monitorare:

vi /etc/nagios/nrpe.cfg

modificare questa riga –> allowed_hosts=127.0.0.1
così –> allowed_hosts=10.0.0.3 (ip del mio mio server Nagios)

5) riavvio nrpe:

/etc/init.d/nagios-nrpe-server restart

6) Riprovare:

root@monitoraggio:~# /usr/local/nagios/libexec/check_nrpe -H 10.0.0.3
NRPE v2.12

Estate

Posted by Cristian | Posted in Work in progress | Posted on 02-06-2010

0

l’estate è finalmente arrivata quindi ci risentiamo a settembre.

VOGLIO VINCERE WINFORLIFE