Coder Social home page Coder Social logo

rust-network-monitor's Introduction

rust-network-monitor

A Network Traffic Monitor built in Rust (work in progress) for learning purposes.

You can read the complete implementation guide here: [Implementing a Network Traffic Analyzer in Rust] (https://medium.com/dev-genius/implementing-a-network-traffic-analyzer-in-rust-50a772bb6564)

Overview

The tool captures packets, analyzes them, and offers various features like filtering, alerting, and flow analysis. It's built using Rust, leveraging libraries such as pcap, pnet, and notify-rust. Features

Packet Capturing: Capture and analyze packets on any network interface. Flow Analysis: Understand broader network traffic patterns. Alerts: Receive notifications based on specific network events.

Getting Started

Prerequisites

  • Rust (latest stable version recommended)
  • libpcap installed on your system
  • Network interface for packet capturing (e.g., eth0)

Installation

  • Clone the repository:

    git clone https://github.com/luishsr/rust-network-monitor.git
    
  • Navigate to the directory:

    cd network-monitoring-rust
    

Build the project:

cargo build --release

The executable will be available in the target/release directory.

Note: You might need root access to run the application properly. If permission denied errors occur, grant access by doing:

  sudo setcap cap_net_raw=eip ./target/debug/{your_project_name}

Usage

  • Run the tool:

    ./target/release/{your_project_name}
    
  • Optional configurations:

    Use the config.toml within the root directory, as shown below, to customize a few parameters:

    [general]
    mode = "summary" # or "detailed"
    
    [alert]
    ip = "10.0.0.0"
    

    Mode: defines the level of logging shown in the console Alert: defines an alert to be shown whenever a packet arrives from a given IP address

rust-network-monitor's People

Contributors

luishsr avatar

Stargazers

 avatar Carlos Armando Marcano Vargas avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.