Vous êtes sur la page 1sur 4

Taller 21: Monitoreo de Red con Nagios

################################################################
Instalar Epel
$> yum -y install epel-release
- Instalar nagios y el MTA local
$> yum -y install nagios nagios-plugins* postfix
Configurar Nagios
$> vim /etc/nagios/nagios.cfg
34:cfg_file=/etc/nagios/objects/services.cfg
cfg_file=/etc/nagios/objects/hosts.cfg
cfg_file=/etc/nagios/objects/windows.cfg
$> vim /etc/nagios/objects/contacts.cfg
30:define contact{
contact_name
nagiosadmin
; Short name
use
generic-contact
;
alias
Nagios Admin
; Full name of user
email
tucorreo@tudominio.com ;
}
$> vim /etc/nagios/objects/hosts.cfg
define host{
use
generic-host
host_name
router.adiestra.pe
alias
Gateway Router
address
192.168.130.1
check_command
check-host-alive
max_check_attempts
20
notification_interval 240
notification_period
24x7
notification_options
d,u,r
contacts
nagiosadmin
}
define host{
use
host_name
alias
address
max_check_attempts
contacts
}
~

generic-host
mail.adiestra.pe
servidor web smtp
192.168.3.2
20
nagiosadmin

$> vim /etc/nagios/objects/services.cfg


define service{
use
generic-service
host_name
mail.adiestra.pe
service_description
HTTP
check_command
check_http
}
define service{
use
generic-service
host_name
mail.adiestra.pe
service_description
SMTP
check_command
check_smtp
}

$> vim /etc/nagios/objects/windows.cfg


25:define host{
use
windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias
My Windows Server ; A longer name associated with the host
address
192.168.130.25 ; IP address of the host
}
Instalar el NSClient en el servidor Windows desde
http://www.nsclient.org/nscp/
Crear usuario del nagios
$> htpasswd -c /etc/nagios/passwd nagiosadmin
clave: alumno
Verificar errores en la configuracin de nagios
$> nagios -v /etc/nagios/nagios.cfg
Iniciar el Servidor Wen para ver el panel de reportes de
Nagios
$> systemctl restart httpd
Iniciar Nagios
$> systemctl start nagios
$> systemctl enable nagios
Deshabilitar SELINUX
$> setenforce 0
Detener el firewall
$> /usr/libexec/iptables/iptables.init stop
Iniciar el MTA
$> systemctl postfix start
$> isystemctl enable postfix
Acceder a Nagios
http://192.168.130.X/nagios
user:nagiosadmin
pass:alumno

Sistema Detector de Intrusos


###################################################################
Descargar Security Onion de http://sourceforge.net/projects/security-onion/
Ej: http://cznic.dl.sourceforge.net/project/security-onion/12.04.5/securityonio
n-12.04.5-20140908.iso
En clase descargar de la web del curso
http://adiestra.pe/centos7
Ahora crear una mquina virtual con 2 GB de RAM y 8GB de disco
Configurar la red con el utilitario grafico

Abrir el navegador firefox


Entrar a www.snort.org
Crear una cuenta gratuita y copiar el onikcode solicitado
Instalar Security Onion
###########################################################################
Dar click al cono Install Security Onion 12.04
Idioma espaol
Tipo de Instalacin: Borrar Disco e Instalar Security Onion
Zona Horaria:
Lima
Teclado:
Espaol
Su nombre:)
alumno
nombre de equipo:
ids
nombre de usuario: alumno
contrasea:
alumno
Una vez que termina pide reiniciar
Loguearse como
usuario:
clave:

alumno
alumno

Configrar las tarjetas en modo bridge


$> /etc/init.d/networking stop
$> vim /etc/network/interfaces
---------------------------------------------------auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto eth1
iface eth1 inet manual
auto br0
iface br0 inet static
address 192.168.130.150
netmask 255.255.255.0
gateway 192.168.130.1
bridge_ports eth0 eth1
bridge_stp off
bridge_fd 0
bridge_maxwait 0
----------------------------------------------------$> /etc/init.d/networking start
Deshabilitar el firewall
$> ufw disable
Configurar Security Onion
##########################################################################
Dar click al cono setup
Welcome ...
Yes, Continue
Would do you like ..
No, nor right Now

Advanced Setup
Standalone
Usuario a loguearse:
Correo para el snorby:
contrasea:
Data a ser guardada por sqguil
Days of data repair
Which IDS Engine...
Which IDS Ruleset...
Snort VRT Oinkcode
VRT Policy
PFRIng module
Which network interface ...
Do you enable IDS Engine?
CPU Cores
Enable Bro
Enbale file Extraction
CPU cores

idsadmin
tucorreo@dominio.com
alumno
30
7
Snort
Snort VRT Ruleset only snd set a VRT Policy
Pegar el oinkcode de tu cuenta
Security
4096
br0
Yes, enable ..
1
Yes
Yes enable file extraction
1
Yes enable http_agent
No Disable Argus
No Disable Prads
Yes enable full packet capture
pcap files 150
No, use default scatter
pcap ring buffer 64
percent of ...
90
No, disable salt
No, disable ELSA
Yes, proced with the changes

Una vez instalado, entrar al snorby


https://192.168.130.X:444
user: tucorreo@dominio.com
pass: alumno

las reglas descargadas se encuentran en


/etc/nsm/rules/downloaded.rules

Vous aimerez peut-être aussi