TGViewer
Sys-Admin InfoSec Sys-Admin InfoSec @sysadm_in_channel · 12.9K subscribers
Post #5491 2.04K
Building Linux eBPF/XDP apps on macOS (Apple Silicon)

I spend a lot of time building high-performance DNS filters and network tools in Go. My primary development machine is an Apple Silicon Mac, but all the production deployments target Linux/AMD64 servers.

Recently, I started heavily integrating eBPF and XDP to drop abusive traffic (like random subdomain attacks) before it even hits the Go networking stack. However, compiling C eBPF code locally on macOS has always been a pain due to the missing Linux headers and the architectural differences...

I wrote down the exact step-by-step process, including a workaround for the notorious Debian multiarch header issue (asm/types.h) and a neat little smoke test using bpftool inside the container..:

https://openbld.net/blog/build-xdp-ebpf-macos-guide/
openbld.net ↗ Building Linux eBPF/XDP Applications on macOS with Colima, Docker, Clang, and Go | OpenBLD A practical guide to building, inspecting, cross-compiling, and running Linux eBPF/XDP applications on macOS using Colima, Docker, Clang, bpf2go, and Go.
More from @sysadm_in_channel
  1. Sep 15, 2026Open SysConf'26 - Доклад: поиск уязвимостей в эпоху AI Кибербезопасность, AI - сегодня иду…
  2. Sep 11, 2026An AI-Assisted Cyber Attack: Inside a Unit 42 Investigation injecting backdoor in to terra…
  3. Sep 9, 2026Threat Spotlight: Phishing pages that exist only inside the victim’s browser https://blog.…
  4. Sep 7, 2026Critical vulnerabilities in MikroTik RouterOS are being actively exploited. Immediate upda…
  5. Sep 4, 2026Post #5494
  6. Sep 3, 2026ChatGPT Is Throwing 404
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →