{"id":20426154,"url":"https://github.com/hnes/frdev","last_synced_at":"2025-04-12T19:06:12.541Z","repository":{"id":18386601,"uuid":"21567594","full_name":"hnes/frdev","owner":"hnes","description":"A high efficient ip black/white list firewall (work as a linux kernel module)","archived":false,"fork":false,"pushed_at":"2018-07-04T11:27:32.000Z","size":224,"stargazers_count":35,"open_issues_count":0,"forks_count":22,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-03-16T03:37:37.870Z","etag":null,"topics":["firewall","kernel"],"latest_commit_sha":null,"homepage":"http://www.cnblogs.com/SwordTao/p/3824980.html","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hnes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-07T11:04:10.000Z","updated_at":"2023-11-15T06:53:05.000Z","dependencies_parsed_at":"2022-07-26T22:16:56.349Z","dependency_job_id":null,"html_url":"https://github.com/hnes/frdev","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnes%2Ffrdev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnes%2Ffrdev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnes%2Ffrdev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hnes%2Ffrdev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hnes","download_url":"https://codeload.github.com/hnes/frdev/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224742351,"owners_count":17362232,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["firewall","kernel"],"created_at":"2024-11-15T07:15:42.959Z","updated_at":"2024-11-15T07:15:43.649Z","avatar_url":"https://github.com/hnes.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Name\n\nfrdev - A high efficient ip black/white list firewall (work as a linux kernel module).\n\nSome details could get from [here](http://www.cnblogs.com/SwordTao/p/3824980.html).\n\n# Usage:\n\n```bash\nmake \nbash install_frdev.sh\nls -hl /dev/frdev*\ngcc fripadm_black_in_exe.c -o fripadm_black_in_exe\ngcc fripadm_white_in_exe.c -o fripadm_white_in_exe\n\nping 192.168.31.100 \n\nbash fripadm_black_in.sh insert '192.168.31.100 8.8.8.8 1.100-1.*.1'\nbash fripadm_black_in.sh switch\nbash fripadm_black_in.sh dump\n\nbash fripadm_white_in.sh insert '192.168.31.100 8.8.8.8 '\nbash fripadm_white_in.sh switch\nbash fripadm_white_in.sh dump\n\n# # do what you want now :)\n\nbash unstall_frdev.sh\n```\n\n# Notes:\n\nThe little patch below will solve the compiling problem in `3.10.0-327.el7.x86_64` (because of the recently kernel updates).\n\n```\ndiff --git a/frdev.c b/frdev.c\nindex e60ea8b..0c36a3b 100644\n--- a/frdev.c\n+++ b/frdev.c\n@@ -8,7 +8,7 @@\n #include \u003clinux/init.h\u003e\n #include \u003clinux/cdev.h\u003e\n #include \u003casm/io.h\u003e\n-#include \u003casm/system.h\u003e\n+#include \u003casm/switch_to.h\u003e\n #include \u003casm/uaccess.h\u003e\n #include \u003clinux/ioctl.h\u003e\n #include \u003clinux/jiffies.h\u003e\n@@ -2042,7 +2042,7 @@ static const struct file_operations fr_ip_mem_fops =\n   .owner = THIS_MODULE,\n   .open = fr_ip_mem_open,\n   .release = fr_ip_mem_release,\n-  .ioctl = fr_ip_memdev_ioctl,\n+  .unlocked_ioctl = fr_ip_memdev_ioctl,\n };\n```\n\n# License\n\nJust feel free and do anything you want with it. \n\nGood luck and Joy!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnes%2Ffrdev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhnes%2Ffrdev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhnes%2Ffrdev/lists"}