Back to Intrusion Detection System

Intrusion Detection System Documentation

Overview

A simple Intrusion Detection System that monitors network traffic for potential Denial of Service attacks by tracking request counts per IP address and banning suspicious activity.

Installation

To install the required dependencies, run:

$pip install colorama

Requirements

  • Python 3.6+
  • colorama
  • sudo/admin privileges

Basic Usage

The basic usage of the tool is as follows:

$sudo python ids.py --threshold 50 --ban-time 300 --interface eth0

Command Line Arguments

ArgumentDescriptionDefault
--helpDisplay help information-
--thresholdMax requests per minute per IP50
--ban-timeBan duration in seconds300
--interfaceNetwork interface to monitorAll interfaces

Examples

Basic Monitoring

Monitor all interfaces with default settings
$sudo python ids.py

Custom Threshold

Set a higher threshold for busy networks
$sudo python ids.py --threshold 100

Specific Interface

Monitor only the eth0 interface
$sudo python ids.py --interface eth0

Troubleshooting

Permission Errors

If you encounter permission errors, especially with network tools like IDS or Packet Sniffer, make sure to run the script with administrator privileges (sudo on Linux/macOS).

Dependencies

If you encounter import errors, ensure all required dependencies are installed:

$pip install colorama

Security Considerations

This tool is provided for educational and legitimate security testing purposes only. Always ensure you have proper authorization before using security tools on any network or system.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.