Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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