An intrusion detection system (IDS) monitors network traffic and system activities for malicious activities or policy violations. An IDS typically consists of sensors to generate security events, a central engine to correlate events and generate alerts, and a console for administrators to monitor alerts. There are different types of IDS, including network IDS that monitor network traffic, and host-based IDS that monitor activities on individual hosts. While firewalls block unwanted traffic using rules, IDS are needed to monitor for attacks hidden in acceptable traffic and help identify unwanted network traffic using signatures and anomaly detection. IDS can operate passively by detecting anomalies and logging or actively by performing actions like blocking traffic (intrusion prevention system).