{"id":21417978,"url":"https://github.com/esonhugh/my_durdur","last_synced_at":"2025-07-14T05:30:29.220Z","repository":{"id":85399450,"uuid":"583875241","full_name":"Esonhugh/my_durdur","owner":"Esonhugh","description":"Cilium/ebpf Learning idea from boratanrikulu/durdur","archived":false,"fork":false,"pushed_at":"2024-04-11T08:04:43.000Z","size":161,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-11T23:55:59.353Z","etag":null,"topics":["dropper","ebpf"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Esonhugh.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}},"created_at":"2022-12-31T09:07:33.000Z","updated_at":"2024-04-15T14:30:42.597Z","dependencies_parsed_at":"2024-04-15T14:30:35.309Z","dependency_job_id":null,"html_url":"https://github.com/Esonhugh/my_durdur","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esonhugh%2Fmy_durdur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esonhugh%2Fmy_durdur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esonhugh%2Fmy_durdur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Esonhugh%2Fmy_durdur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Esonhugh","download_url":"https://codeload.github.com/Esonhugh/my_durdur/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225950904,"owners_count":17550348,"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":["dropper","ebpf"],"created_at":"2024-11-22T19:18:24.887Z","updated_at":"2024-11-22T19:18:25.479Z","avatar_url":"https://github.com/Esonhugh.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Durdur\n\n[Durdur](https://www.youtube.com/watch?v=sF0QweCoaMo) is a CLI tool for Linux implementing L4 package dropping with eBPF/Go (proof of concept).\n\n## How to install\n\n### From source;\n\nBuild and use `build/durdur` binary.\n\n```\nmake build\n```\n\n## How to Use\n\n```shell\n# ./build/durdur help   \nDurdur is a L4 package Dropper/Firewall.\n\nUsage:\n  durdur [command]\n\nAvailable Commands:\n  attach      Attaches the program to the network.\n  completion  Generate the autocompletion script for the specified shell\n  detach      Detaches the program from the network.\n  drop        Add new IP/port to the maps.\n  help        Help about any command\n  list        List all the rules\n  log         print logs of dropping data\n  undrop      Add new IP/port to the maps.\n\nFlags:\n  -b, --bpffs string   mounted bpffs location (default \"/sys/fs/bpf\")\n  -d, --debug          Enable debug mode\n  -h, --help           help for durdur\n\nUse \"durdur [command] --help\" for more information about a command.\n```\n\n### Attach to interface\n\n```shell  \n./build/durdur attach -i eth0 -d\nINFO[0000] Trying to attach XDP and TC eBPF program to the eth0. \nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully     \n```\n\n### Detach from interface\n\n```shell\n./build/durdur detach\nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nINFO[0000] Detached from the network.     \n```\n\n### Add a drop rule\n\n```shell\n# ./build/durdur drop --dst -i 198.19.249.98 -p 8000\nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nINFO[0000] MapOperation: add dst 198.19.249.98 8000   \n# ./build/durdur drop --dst -i 198.19.249.97        \nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nINFO[0000] MapOperation: add dst 198.19.249.97 0 \n# ./build/durdur drop --src -i 198.19.249.97\nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nINFO[0000] MapOperation: add src 198.19.249.97 0  \n```\n\n### List all rules\n\n```shell\n# ./build/durdur list                       \nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nINFO[0000] --ingress-\u003e world 198.19.249.97:any hint-rule:0 \nINFO[0000] world \u003c-egress-- 198.19.249.97:any hint-rule:0 \nINFO[0000] world \u003c-egress-- 198.19.249.98:8000 hint-rule:0 \n```\n\n### Del a drop rule\n\n```shell\n#  ./build/durdur undrop --src -i 198.19.249.97\nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nINFO[0000] MapOperation: del src 198.19.249.97 0 \n```\n\n### Print logs\n\n```shell\n# ./build/durdur log\nINFO[0000] Load XDP eBPF program successfully           \nINFO[0000] Load TC eBPF program successfully            \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:46279 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:5790 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:5790 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:5790 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:5790 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:5790 to 198.19.249.98:16415 \nDropped Packect from 198.19.249.193:5790 to 198.19.249.98:16415 \n```\n\n\n## Copyright\n\n[GPL-3.0 license](https://github.com/boratanrikulu/durdur/blob/main/LICENSE),  \nCopyright 2022 Bora Tanrikulu \u003c[me@bora.sh](mailto:me@bora.sh)\u003e\nCopyright 2024 Esonhugh \u003c[durdur-project@eson.ninja](mailto:durdur-project@eson.ninja)\u003e","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesonhugh%2Fmy_durdur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesonhugh%2Fmy_durdur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesonhugh%2Fmy_durdur/lists"}