You’re looking for intrusion detection software.
https://en.wikipedia.org/wiki/Intrusion_detection_system

I haven’t looked into this market in several years, but before it was EOL’d I used Black Ice Defender. I don’t know if anyone else has made software to fill the gap it left behind: it was simple to use and understand even for non professionals, yet it still gave incredible detail of each intrusion attempt and took active steps to block them.
_________________________
Tony Fabris