netbird icon indicating copy to clipboard operation
netbird copied to clipboard

[client] Implement dns routes for Android

Open lixmal opened this issue 6 months ago • 2 comments

Describe your changes

This PR implements dns routes on android by

  • Routing a 240.0.0.0/8 block on startup
  • On DNS traffic, assigning IPs from this block and returning those as DNS response
  • The client sends packets to these fake IPs, which are then DNATed to the real IPs
  • On the interface we assign the real IPs as allowed IPs
  • For return traffic we apply the same process in reverse
  • Requires the wildcard feature to be enabled, otherwise we cannot replace the IPs in DNS responses

Issue ticket number and link

Stack

Checklist

  • [ ] Is it a bug fix
  • [ ] Is a typo/documentation fix
  • [x] Is a feature enhancement
  • [ ] It is a refactor
  • [ ] Created tests that fail without the change (if possible)
  • [ ] Extended the README / documentation, if necessary

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

lixmal avatar Jun 17 '25 00:06 lixmal

Screenshot_20250626-144834 (1) Looks like we do not propagate any name for the network list

pappz avatar Jun 26 '25 13:06 pappz