Skip to content

Sakshiii963/linux-network-optimizer-firewall

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linux Network Optimization & Kernel Firewall

Overview

This project implements a high-performance Linux kernel module that optimizes inter-network namespace communication and integrates a scalable in-kernel firewall.

It reduces packet traversal overhead by bypassing virtual bridges and enables efficient firewall rule management using Red-Black Trees.


Key Features

Inter-Namespace Optimization

  • Direct packet reinjection using MAC-based routing
  • Eliminates multiple virtual bridge hops
  • Achieved ~71% latency reduction (1.74 ms → 0.51 ms)

Scalable Kernel Firewall

  • Implemented using Red-Black Trees
  • O(log n) rule lookup vs iptables' O(n)
  • Reduced CPU usage from ~89% → ~0.7%

User-Kernel Communication

  • ioctl-based interface via character device
  • Supports dynamic rule insertion/deletion from user space

Tech Stack

  • C (Linux Kernel Development)
  • C++ (User-space application)
  • Netfilter Hooks
  • Linux Networking Stack

Components

  • firewall.c → Kernel module (routing + firewall logic)
  • firewall_app.cpp → User-space control application
  • Additional test utilities (UDP client, scripts, etc.)

Results

  • Significant latency reduction in inter-namespace communication
  • High scalability under large rule sets
  • Efficient CPU utilization compared to iptables

About

High-performance Linux kernel module for namespace packet optimization and scalable firewall (Netfilter + RB Trees)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors