How Intrusion Detection and Prevention Systems (IDPS) works