{"id":18497048,"url":"https://github.com/jakubvojvoda/linux-firewall","last_synced_at":"2025-06-27T17:33:22.699Z","repository":{"id":109048255,"uuid":"58262541","full_name":"JakubVojvoda/linux-firewall","owner":"JakubVojvoda","description":"Simple Linux firewall using Netfiler","archived":false,"fork":false,"pushed_at":"2016-09-22T13:22:11.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-14T04:35:43.442Z","etag":null,"topics":["c","firewall","kernel","netfilter","netfilter-hook","packet-processing"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakubVojvoda.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-05-07T11:13:17.000Z","updated_at":"2023-05-12T16:44:09.000Z","dependencies_parsed_at":"2023-05-04T02:32:25.194Z","dependency_job_id":null,"html_url":"https://github.com/JakubVojvoda/linux-firewall","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/JakubVojvoda%2Flinux-firewall","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakubVojvoda%2Flinux-firewall/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakubVojvoda%2Flinux-firewall/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakubVojvoda%2Flinux-firewall/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakubVojvoda","download_url":"https://codeload.github.com/JakubVojvoda/linux-firewall/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254071511,"owners_count":22009802,"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":["c","firewall","kernel","netfilter","netfilter-hook","packet-processing"],"created_at":"2024-11-06T13:33:08.647Z","updated_at":"2025-05-14T04:36:55.911Z","avatar_url":"https://github.com/JakubVojvoda.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linux Firewall\n\nImplementation of a simple Linux Firewall using Netfilter for packet manipulation. The source code is licensed under MIT license (see [LICENSE]) and you should use it (insert builded kernel module) ONLY at your OWN RISK.\n\n### User space application\nCommand line application that communicates with a given kernel module. The possible command line arguments are following:\n\n* argument `-a RULE`\n * add specific rule to the filtering logic \n * `RULE`: `NUMBER ACTION PROTOCOL FROM address TO address src dst`, where `address` is `IP` or `ANY`, `src` is optional (`SRCPORT NUMBER`) and `dst` is optional destination port (`DSTPORT NUMBER`). \n* argument `-f FILTER-FILE`\n * add all rules defined in the file `FILTER-FILE` to the filtering logic\n* argument `-d RULE-ID`\n * delete rule from the filtering logic\n * `RULE-ID` is a rule identificator\n* argument `-p`\n * print list of rules defined in the module\n\n\n### Kernel module\nImplementation of the kernel modul for Linux in version compatible with kernel version 3.13.\n\n\n### Provided files\nThe repository contains files\n\n* `pdsfw.c` - kernel module\n* `pdscli.c` - user space application\n* `lexer.l` - lexical analyzer ([flex]) input\n* `parser.y` - parser ([bison]) input\n* `Makefile`\n\nUsing the `make` command it is possible to build user space application and kernel module. The kernel module can be loaded using command `insmod pdsfw.ko` (at your own risk !!!) and removed using command `rmmod pdsfw`. In case of unexpected problems (eg. failure due to lack of memory, ...), the state is written in log file which can be displayed using command `dmesg`.\n\n### References\n* [How to Write a Linux Firewall]\n* [Course: Data Communications, Computer Networks and Protocols]\n\n[How to Write a Linux Firewall]: http://www.roman10.net/a-linux-firewall-using-netfilter-part-1overview/\n[Course: Data Communications, Computer Networks and Protocols]: http://www.fit.vutbr.cz/study/course-l.php.en?id=11584\n[flex]: http://flex.sourceforge.net/\n[bison]: https://www.gnu.org/software/bison/\n[LICENSE]: https://github.com/JakubVojvoda/linux-firewall/blob/master/LICENSE","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakubvojvoda%2Flinux-firewall","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakubvojvoda%2Flinux-firewall","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakubvojvoda%2Flinux-firewall/lists"}