{"id":17067312,"url":"https://github.com/schu/bpf-cgroup-firewall-demo","last_synced_at":"2026-05-01T01:32:40.802Z","repository":{"id":140968127,"uuid":"165515965","full_name":"schu/bpf-cgroup-firewall-demo","owner":"schu","description":null,"archived":false,"fork":false,"pushed_at":"2019-05-17T20:25:23.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-23T09:49:48.325Z","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/schu.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":"2019-01-13T14:37:21.000Z","updated_at":"2023-01-12T00:17:40.000Z","dependencies_parsed_at":"2024-06-19T05:10:20.436Z","dependency_job_id":"3f4d0ff3-9ae2-4ef3-a4e0-04cec8488e30","html_url":"https://github.com/schu/bpf-cgroup-firewall-demo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schu/bpf-cgroup-firewall-demo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schu%2Fbpf-cgroup-firewall-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schu%2Fbpf-cgroup-firewall-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schu%2Fbpf-cgroup-firewall-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schu%2Fbpf-cgroup-firewall-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schu","download_url":"https://codeload.github.com/schu/bpf-cgroup-firewall-demo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schu%2Fbpf-cgroup-firewall-demo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2024-10-14T11:10:18.034Z","updated_at":"2026-05-01T01:32:40.782Z","avatar_url":"https://github.com/schu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Demo code showing how to create and pin a `cgroup/skb` eBPF program (here done\nwith `load-firewall`) that can be loaded and used from a second program (here\ndone with `attach-firewall`)\n\n```\ngo get -u github.com/iovisor/gobpf/elf\nmake\n./load-firewall /sys/fs/bpf/cgroup-firewall-demo\nmkdir /sys/fs/cgroup/unified/cgroup-firewall-demo\n./attach-firewall /sys/fs/bpf/cgroup-firewall-demo /sys/fs/cgroup/unified/cgroup-firewall-demo/\n```\n\nNow open a new shell and add its pid to the cgroup:\n\n```\necho PID \u003e /sys/fs/cgroup/unified/cgroup-firewall-demo/cgroup.procs\n```\n\nThen run e.g. `ping -4 ipschwein.de` from the shell in the cgroup.\n\nIn the kernel's `trace_pipe` you should see a TODO message for each packet:\n\n```\ncat /sys/kernel/debug/tracing/trace_pipe\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschu%2Fbpf-cgroup-firewall-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschu%2Fbpf-cgroup-firewall-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschu%2Fbpf-cgroup-firewall-demo/lists"}