Vollbildmodus: Seiteninhalt ohne Menus

Hear your Firewall

Source

This little script watches the /var/log/kern.log for the string [FW] default which is logged by my firewall when dropping a package. For each map a little beep is sent to the pc speaker.

You need beep for it.

#> apt-get install beep
#!/bin/sh
 
tail -f /var/log/kern.log | \
 awk '
   $0 ~ /\[FW\] default/ {
     match($0, / DPT=([0-9]+) /, matches);
     port = matches[1];
     print port;
     if (port < 1024) {
       system("beep -f 500 -l 100");
     }else{
       system("beep -f 2000 -l 100");
     }
   }
 '
 
shellscripts/hear_dropped_packets.txt · Zuletzt geändert: 2006/11/17 22:29 (Externe Bearbeitung)