[PR #1083] DNS forwarder and common ebpf loader #2993

Open
opened 2025-11-20 08:04:37 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/netbirdio/netbird/pull/1083

State: closed
Merged: Yes


Describe your changes

This PR contains multiple modifications.

In case the 53 UDP port is not option to bind then we hijack the DNS traffic with eBPF and we forward the traffic to the listener on a custom port. With this implementation we should be able to listen DNS queries on any address and still set the local host system to send queries to the custom address on port 53.

Because we tried to attach multiple xdp program to the same interface I did a refactor in the WG traffic forward code also.

NB-282

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary
**Original Pull Request:** https://github.com/netbirdio/netbird/pull/1083 **State:** closed **Merged:** Yes --- ## Describe your changes This PR contains multiple modifications. In case the 53 UDP port is not option to bind then we hijack the DNS traffic with eBPF and we forward the traffic to the listener on a custom port. With this implementation we should be able to listen DNS queries on any address and still set the local host system to send queries to the custom address on port 53. Because we tried to attach multiple xdp program to the same interface I did a refactor in the WG traffic forward code also. ## Issue ticket number and link NB-282 ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary
saavagebueno added the pull-request label 2025-11-20 08:04:37 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/netbird#2993