Skip to main content

This is a Python-based solution for collecting and analyzing Netflow V9 traffic data.

Project description

netflow2json

This is a Python-based solution for collecting and analyzing Netflow V9 traffic data.

Installation

You can install netflow2json using pip:

pip install netflow2json

Usage

To use netflow2json, you can create an instance of the NetflowProcessor class and start processing Netflow data. See the Examples section for detailed usage examples.

Configuration

You can configure the package by specifying the web_port, netflow_port, and local_ip_ranges when creating a NetflowProcessor instance.

  • local_ip_ranges: This section is used to define local IP address ranges. The code uses these ranges to categorize Netflow traffic as "Local," "Upload," or "Download."

    Example:

    local_ip_ranges = ["192.168.0.0/24", "172.16.11.0/24", "172.16.12.0/24", "172.16.13.0/24", "172.16.14.0/24", "172.16.16.0/24"]
    
  • netflow_port: Specify the port (UDP) on which the code listens for incoming Netflow v9 traffic.

    Example:

    netflow_port = 2055
    
  • web_port: Specify the port of web accessible json results.

 web_port = 80

Examples

from netflow2json.analyser import NetflowProcessor

processor = NetflowProcessor(web_port=8080, netflow_port=2055, local_ip_ranges=['172.16.11.0/24','172.16.12.0/24','172.16.13.0/24','172.16.14.0/24','192.168.0.0/24','192.168.1.0/24'])
processor.start()

License

This project is licensed under the MIT License

Project Repository

Visit the GitHub repository for the latest updates and to contribute.

Bug Tracker

If you encounter any issues or want to report a bug, please visit the Bug Tracker.

Contact Information

For questions or support, you can reach out to the author at h.haghpanah@outlook.com.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netflow2json-0.0.2.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

netflow2json-0.0.2-py3-none-any.whl (5.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page