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.

link|improve this question
feedback

1 Answer

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.

link|improve this answer
thanks, i'll try that. – nonchip Jun 6 '11 at 12:18
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.