{"id":23985600,"url":"https://github.com/navin772/go-ebpf-accuknox","last_synced_at":"2026-06-20T05:01:26.208Z","repository":{"id":244660189,"uuid":"815805637","full_name":"navin772/go-ebpf-accuknox","owner":"navin772","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-16T12:01:34.000Z","size":1093,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-25T02:18:53.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","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/navin772.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-16T08:01:33.000Z","updated_at":"2024-06-16T12:04:11.000Z","dependencies_parsed_at":"2024-06-16T14:25:17.998Z","dependency_job_id":"764cc394-70b7-4c48-969d-0f275a35af56","html_url":"https://github.com/navin772/go-ebpf-accuknox","commit_stats":null,"previous_names":["navin772/go-ebpf-accuknox"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/navin772/go-ebpf-accuknox","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navin772%2Fgo-ebpf-accuknox","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navin772%2Fgo-ebpf-accuknox/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navin772%2Fgo-ebpf-accuknox/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navin772%2Fgo-ebpf-accuknox/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/navin772","download_url":"https://codeload.github.com/navin772/go-ebpf-accuknox/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/navin772%2Fgo-ebpf-accuknox/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34557553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-20T02:00:06.407Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-01-07T14:25:58.493Z","updated_at":"2026-06-20T05:01:26.191Z","avatar_url":"https://github.com/navin772.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Task 1 - Drop TCP packets on a specific port\n\nDropping TCP packets on a specific port using eBPF.\n\n## Pre-requisites\n\n1. A relatively recent version of the Linux kernel (\u003e= 4.4) for full eBPF support.\n2. The `clang` compiler - `sudo apt-get -y install clang`.\n3. The `llvm` tools package - `sudo apt-get -y install llvm-14-tools`.\n4. The `libbpf` and `bpftool` library - `sudo apt-get -y install libbpf-dev bpftool`.\n5. `go` - The go programming language compiler and tools.\n\n## Running the eBPF program \n\n1. Clone the repo: \n    \n    `git clone https://github.com/navin772/go-ebpf-accuknox.git`.\n\n2. Compile the eBPF program using clang:\n\n    `clang -O2 -g -target bpf -c bpf/xdp_prog.c -o bpf/xdp_prog.o`\n\n3. Compile the go program:\n\n    `sudo go run main.go -port 4040`\n\n    or\n    \n    `sudo $(which go) run main.go -port 4040`\n\n    \u003e **Note:** Replace the port on which you want to drop the packets. The default is `4040`.\n\n\n## Verify the eBPF program\nCreate 2 new terminal sessions - 1 and 2.\n\n\n\u003e **Note:** The go program is configured to drop packets on the `loopback` (lo) interface, hence the packets will be dropped only if the server is running on the same machine (`localhost`).\n\n1. Start a python (or any other) http server on port `4040` on terminal 1:\n\n    `python3 -m http.server 4040`\n\n2. Try to access the server from terminal 2:\n\n    `curl --max-time 10 http://localhost:4040`\n\n3. No connection will be made to the server and the connection will timeout, hence the TCP packets are being succesfully dropped.\n4. Stop the running eBPF program by pressing `Ctrl+C` and verify that the `curl` command works as expected.\n\n## Demo: Dropping TCP Packets\n\nhttps://github.com/navin772/go-ebpf-accuknox/assets/98466550/03707554-0f5b-4003-8a5b-a22f8aca2d78\n\n\n# Task 3 - Explain Go concurrency code\n\nhttps://github.com/navin772/go-ebpf-accuknox/tree/main/go_concurrency","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavin772%2Fgo-ebpf-accuknox","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnavin772%2Fgo-ebpf-accuknox","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnavin772%2Fgo-ebpf-accuknox/lists"}