0

I'd like to know how/if it is possible to get my linux (ubuntu) box to exec a command (script) on incoming icmp/ping (or other network events) requests?

Like e.g. playing a "ping" sound when being pinged, or playing an alert sound on specific source IP match.

user9517
  • 114,104
  • 20
  • 206
  • 289
nonchip
  • 67
  • 9

1 Answers1

1

I suspect that to do this with a dedicated program (that intercepts IP packets) would be a fairly heavyweight bit of programming. If this is just a casual thing then judicious use of logging with iptables or tcpdump along with tail to watch the log and a simple shell script or scripts would do the job.

blankabout
  • 1,004
  • 1
  • 9
  • 16