5

I'd like to be able to be notified in any way (sound, notification, growl, etc) when someone pings my machine.

Is that possible?

2
  • 3
    I would probably have a pair of shell scripts. One running tcpdump and grepping for "ICMP echo request" and writing to a pipe and another script reading from the pipe and doing the rate limiting (so a ping flood doesn’t occupy your speakers for days) and calling terminal-notifier. However, I've done a fair amount of shell scripting, so you might not want this implementation if you're not handy with light scripting tools and syntax.
    – bmike
    Mar 25, 2013 at 20:04
  • This is useful to detect as early as possible when someone at the other end of the Internet will next fire an nmap against your Mac and finally try to penetrate it.
    – dan
    May 24, 2022 at 22:24

2 Answers 2

3

Little Snitch may have the feature you want. It allows you to set up rules on network traffic, both inbound and outbound, mostly for blocking unwanted traffic, but I believe it can perform arbitrary actions such as notification for specific rules and types of traffic like ICMP pings.

There's a trial version that you can use to test.

I have no affiliation with Little Snitch or the company behind it.

3

Here is a well tested perl script to enable this kind of cheap attack detector: sonar perl script

The sound will change along the logarithmic level of probes (ping).

From an original idea of bmike.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .