21 mayo 2014

Script para monitorear el trafico de red

Monitoreando el trafico de red

#!/bin/sh
# monitor-traffic.sh - Monitor network traffic excluding common requests
# Andres Hernandez - Tonejito
TCPDUMP=/usr/sbin/tcpdump
IP=/sbin/ip
DEV=en1
ADDR=`$IP addr show dev $DEV | grep 'inet ' | cut -d ' ' -f 6 | cut -d '/' -f 1`
$TCPDUMP -ni $DEV "host $ADDR and port not (67 or 68 or 80 or 443 or 1863 or 5222 or 587 or 993 or 995)"

Tomado de: http://tonejito.blogspot.com.ar/2011/12/monitoring-my-network-traffic.html

No hay comentarios: