The goal of this final project is to implement a Linux Kernel Module which monitors or filters network traffic. The project could be structurally broken up to two parts, namely the kernel module and the Netfilter. Kernel modules are runnable extensions that could be loaded and unload into the kernel. For our project, kernel modules are planted to implement certain functions such as reading and writing to proc files and filtering net traffic. Netfilter is a kernel-provided framework that provides the constants, structures and functions to monitor or drop communication to different IP addresses.
1.Monitor all Traffic
2.Monitor Traffic to a specific IP address
3.Monitor Traffic from a specific IP address
4.Block all Traffic
5.Block Traffic to a specific IP address
6.Block Traffic from a specific IP address
- Clone this project sd
git clone https://github.com/yya007/TrafficMonitor.git
cd TrafficMonitor - running the project
bash build.sh - (Optional) Set target IP adress
eg. echo "127.168.1.1" >/proc/IP; - (Optional) Set function
eg. echo "1" >/proc/Function
NO: "1" means Monitor all Traffic, other function see Function section
Illegal input will not change current function. - Check the log file
cat