lunes, 7 de mayo de 2012

Contidad de conexiones por IP, puerto y servicio

Contar conexiones por IP



netstat -ntu | grep ':' | awk '{print $5}' | awk '{sub("::ffff:","");print}' | cut -f1 -d ':' | sort | uniq -c | sort -n


Respuesta;

      1 65.54.190.15                                                                                                      
      2 148.235.52.21                                                                                                      
      2 96.2.31.16
      3 189.133.151.131
      3 190.21.212.171
      4 66.249.73.209
      5 66.249.73.214
      9 66.249.73.204
     10 201.200.19.2
     10 66.249.73.24
     14 201.157.31.160
     16 201.157.31.158
     19 200.94.75.106
     40 189.132.152.183
     43 189.234.211.10
     49 189.230.201.13
     49 200.4.56.151
     77 187.210.71.51
     84 187.150.51.56
     94 127.0.0.1
    152 189.132.158.220


Contar conexiones por puertos

netstat -apn | awk '{print $4}' | cut -d: -f2 | sort | uniq -c | sort -n

Respuesta:
      1 25
      1 110
      1 8880
      1 995
      2 993
      6 143
      9 110
     10 123
     18 25
     20 53
     28 3036
     56 82
    889 80


Contar conexiones por ejecutable:


netstat -apn | awk '{print $7}' | cut -d/ -f2 | sort | uniq -c | sort -n

Respuesta:
      1 ntpd
      1 python
      1 sshd
      2 couriertls
      2 pop3d
      6 xinetd
      8 mysqld
      8 httpd
      9 qmail-smtpd
     10 named
     17 perl
     18 httpd
     23 lighttpd









No hay comentarios:

Publicar un comentario

Ejemplo de factura electrónica 2022 en Panamá (DGI)

Código fuente Facturación 2022 Panamá Panamá comenzó el proceso de migración a facturación electrónica,  actualmente ya salieron los primero...