{"id":15057061,"url":"https://github.com/boratanrikulu/durdur","last_synced_at":"2025-08-23T19:32:04.929Z","repository":{"id":64297300,"uuid":"545536915","full_name":"boratanrikulu/durdur","owner":"boratanrikulu","description":"Lightweight packet filtering for Linux: 'durdur' is a high-performance, eBPF-based simple firewall tool that drops packets by IP or DNS domain. Perfect for on-demand network control.","archived":false,"fork":false,"pushed_at":"2024-07-27T23:18:45.000Z","size":564,"stargazers_count":82,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-23T05:12:56.533Z","etag":null,"topics":["bpf","dns","ebpf","firewall","networking","xdp"],"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/boratanrikulu.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":"2022-10-04T14:43:06.000Z","updated_at":"2025-01-14T15:02:20.000Z","dependencies_parsed_at":"2024-12-18T01:10:25.426Z","dependency_job_id":"397a2c38-7e16-4ba4-bf6e-c101c7213486","html_url":"https://github.com/boratanrikulu/durdur","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/boratanrikulu%2Fdurdur","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fdurdur/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fdurdur/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boratanrikulu%2Fdurdur/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boratanrikulu","download_url":"https://codeload.github.com/boratanrikulu/durdur/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236455667,"owners_count":19151517,"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":["bpf","dns","ebpf","firewall","networking","xdp"],"created_at":"2024-09-24T22:01:35.816Z","updated_at":"2025-01-31T02:37:45.281Z","avatar_url":"https://github.com/boratanrikulu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Durdur 🐝\n\n[![Build Status](https://github.com/boratanrikulu/durdur/actions/workflows/test.yml/badge.svg)](https://github.com/boratanrikulu/durdur/actions?query=branch%3Amain)\n[![Go Report Card](https://goreportcard.com/badge/github.com/boratanrikulu/durdur)](https://goreportcard.com/report/github.com/boratanrikulu/durdur)\n[![codecov](https://codecov.io/gh/boratanrikulu/durdur/branch/main/graph/badge.svg?token=3ACWW3Y2A0)](https://codecov.io/gh/boratanrikulu/durdur)\n[![LICENSE](https://img.shields.io/github/license/boratanrikulu/durdur.svg)](https://github.com/boratanrikulu/durdur/blob/main/LICENSE)\n\n[Durdur](https://www.youtube.com/watch?v=sF0QweCoaMo) is a CLI tool for Linux implementing L3/L4 packet dropping with eBPF/Go.\n\n![example](doc/example.png)\n\n## How to use\n\nDurdur is easy to use with these commands: **`attach`**, **`detach`**, **`drop`**, **`undrop`**, and **`list`**.  \nAll commands should be run with **root privileges**.\n\n### Attach\n\n**`attach`** installs Durdur on the system for a specific interface.\n\n```sh\ndurdur attach --interface eth0\n```\n\n### Detach\n\n**`detach`** uninstalls Durdur from the system.\n\n```sh\ndurdur detach\n```\n\n### Drop and Undrop\n\n**`drop`** and **`undrop`** checks all (ingress) L3 and L4 packets in the system and either block or allow them.  \nBoth commands support the following flags:  \n\n- **`src`** for the source address value of an IPv4 packet.\n- **`dns`** for the domain value of a DNS packet.\n\nExample usage for **`drop`**;\n\n```sh\ndurdur drop --src \"192.0.1.1\"\n```\n\n```sh\ndurdur drop --dns \"example.com\"\n```\n\nExample usage for **`undrop`**;\n\n```sh\ndurdur undrop --src \"192.0.1.1\"\n```\n\n```sh\ndurdur undrop --dns \"example.com\"\n```\n\n### List\n\n`list` writes all entires of the maps to the stdout. It has 3 subcommands; `src`, `dns`, and `all`.\n\nExample usage for **`list`**;\n```sh\ndurdur list src\n```  \n```sh\ndurdur list dns\n```\n```sh\ndurdur list all\n```\n\n## How to install\n\n### From source;\n\nBuild and use `build/durdur` binary.\n\n```\nmake build\n```\n\n### From Docker image;\n\nBuild the image.  \n```sh\nmake build-docker\n```\n\nRun the container with **privileges**.  \n\nExample usage;  \n\n```sh\ndocker run --rm -i -t --net=\"host\" --privileged -v /sys/fs/bpf:/sys/fs/bpf durdur -- attach -i eth0\n```\n\n```sh\ndocker run --rm -i -t --net=\"host\" --privileged -v /sys/fs/bpf:/sys/fs/bpf durdur -- drop --dns \"example\"\n```\n\nPS: You don't need to use `--net=\"host\"` if you don't want to access host's interfaces.\n\n## TODO\n\n- [ ] Egress support.\n- [ ] Wildcard support to DNS.\n- [ ] IPv6 support.\n- [ ] Multiple interfaces support.\n- [ ] Port support.\n\n## Copyright\n\n[GPL-3.0 license](https://github.com/boratanrikulu/durdur/blob/main/LICENSE),  \nCopyright 2022-2024 Bora Tanrikulu \u003c[me@bora.sh](mailto:me@bora.sh)\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboratanrikulu%2Fdurdur","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboratanrikulu%2Fdurdur","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboratanrikulu%2Fdurdur/lists"}