ebpf not working in a docker container #441

Closed
opened 2025-11-20 05:11:24 -05:00 by saavagebueno · 3 comments
Owner

Originally created by @lfarkas on GitHub (Sep 11, 2023).

running on home assistant in a docker container it gives this error:

2023-09-11T18:16:30+02:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: load program: permission denied: 12: (2d) if r2 > r1 goto pc+148: R1 pointer comparison prohibited (21 line(s) omitted)

i use these privileges during docker run:

Originally created by @lfarkas on GitHub (Sep 11, 2023). running on home assistant in a docker container it gives this error: ``` 2023-09-11T18:16:30+02:00 WARN client/internal/wgproxy/factory_linux.go:15: failed to initialize ebpf proxy, fallback to user space proxy: field NbXdpProg: program nb_xdp_prog: load program: permission denied: 12: (2d) if r2 > r1 goto pc+148: R1 pointer comparison prohibited (21 line(s) omitted) ``` i use these privileges during docker run: - NET_ADMIN - NET_RAW - BPF but not - SYS_ADMIN - SYS_RAWIO since those are not required according to: https://github.com/netbirdio/netbird/issues/933
Author
Owner

@pappz commented on GitHub (Sep 12, 2023):

Hello @lfarkas!
Based on the documentation the SYS_ADMIN and SYS_RESOURCE capabilities are required. Could you take a try with it?

@pappz commented on GitHub (Sep 12, 2023): Hello @lfarkas! Based on the [documentation](https://docs.netbird.io/how-to/installation#running-net-bird-in-docker) the **SYS_ADMIN** and **SYS_RESOURCE** capabilities are required. Could you take a try with it?
Author
Owner

@lfarkas commented on GitHub (Sep 13, 2023):

i added these and the warning disappear..
although in a previous discussion it was stated that these not needed on newer kernel...

@lfarkas commented on GitHub (Sep 13, 2023): i added these and the warning disappear.. although in a previous discussion it was stated that these not needed on newer kernel...
Author
Owner

@pappz commented on GitHub (Sep 13, 2023):

Thank you for the feedback!

@pappz commented on GitHub (Sep 13, 2023): Thank you for the feedback!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#441