Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hnes/frdev
A high efficient ip black/white list firewall (work as a linux kernel module)
https://github.com/hnes/frdev
firewall kernel
Last synced: about 1 month ago
JSON representation
A high efficient ip black/white list firewall (work as a linux kernel module)
- Host: GitHub
- URL: https://github.com/hnes/frdev
- Owner: hnes
- Created: 2014-07-07T11:04:10.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2018-07-04T11:27:32.000Z (over 6 years ago)
- Last Synced: 2024-03-16T03:37:37.870Z (10 months ago)
- Topics: firewall, kernel
- Language: C
- Homepage: http://www.cnblogs.com/SwordTao/p/3824980.html
- Size: 219 KB
- Stars: 35
- Watchers: 7
- Forks: 22
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Name
frdev - A high efficient ip black/white list firewall (work as a linux kernel module).
Some details could get from [here](http://www.cnblogs.com/SwordTao/p/3824980.html).
# Usage:
```bash
make
bash install_frdev.sh
ls -hl /dev/frdev*
gcc fripadm_black_in_exe.c -o fripadm_black_in_exe
gcc fripadm_white_in_exe.c -o fripadm_white_in_exeping 192.168.31.100
bash fripadm_black_in.sh insert '192.168.31.100 8.8.8.8 1.100-1.*.1'
bash fripadm_black_in.sh switch
bash fripadm_black_in.sh dumpbash fripadm_white_in.sh insert '192.168.31.100 8.8.8.8 '
bash fripadm_white_in.sh switch
bash fripadm_white_in.sh dump# # do what you want now :)
bash unstall_frdev.sh
```# Notes:
The little patch below will solve the compiling problem in `3.10.0-327.el7.x86_64` (because of the recently kernel updates).
```
diff --git a/frdev.c b/frdev.c
index e60ea8b..0c36a3b 100644
--- a/frdev.c
+++ b/frdev.c
@@ -8,7 +8,7 @@
#include
#include
#include
-#include
+#include
#include
#include
#include
@@ -2042,7 +2042,7 @@ static const struct file_operations fr_ip_mem_fops =
.owner = THIS_MODULE,
.open = fr_ip_mem_open,
.release = fr_ip_mem_release,
- .ioctl = fr_ip_memdev_ioctl,
+ .unlocked_ioctl = fr_ip_memdev_ioctl,
};
```# License
Just feel free and do anything you want with it.
Good luck and Joy!