[PR #5706] [MERGED] [client] Add IPv6 routing, fake IPs, and DNS bind selection #23711

Open
opened 2026-08-05 06:07:45 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5706
Author: @lixmal
Created: 3/26/2026
Status: Merged
Merged: 4/9/2026
Merged by: @lixmal

Base: client-ipv6-acl-uspHead: client-ipv6-routing


📝 Commits (9)

  • da6f610 Add IPv6 routing support with forwarding, fake IPs, and exit node handling
  • a9ee25a Merge branch 'client-ipv6-acl-usp' into client-ipv6-routing
  • a3925c9 Merge remote-tracking branch 'origin/client-ipv6-acl-usp' into client-ipv6-routing
  • 7dff0e2 Keep successful DNS answers when only one address family query fails
  • ff1838b Merge remote-tracking branch 'origin/client-ipv6-acl-usp' into client-ipv6-routing
  • 75e5d33 Merge branch 'client-ipv6-acl-usp' into client-ipv6-routing
  • 521e6df Merge remote-tracking branch 'origin/client-ipv6-acl-usp' into client-ipv6-routing
  • b5fcdce Merge branch 'client-ipv6-acl-usp' into client-ipv6-routing
  • 954c2c1 [client] Add dual-stack nftables manager with IPv6 table support (#5707)

📊 Changes

64 files changed (+2136 additions, -542 deletions)

View changed files

📝 client/android/client.go (+60 -19)
📝 client/android/route_command.go (+5 -2)
📝 client/anonymize/anonymize.go (+9 -2)
📝 client/anonymize/anonymize_test.go (+7 -7)
📝 client/cmd/ssh.go (+2 -2)
📝 client/cmd/ssh_test.go (+2 -2)
📝 client/firewall/iptables/acl_linux.go (+28 -3)
📝 client/firewall/iptables/manager_linux.go (+210 -26)
📝 client/firewall/iptables/router_linux.go (+50 -18)
📝 client/firewall/iptables/rule.go (+1 -0)
📝 client/firewall/iptables/state_linux.go (+30 -0)
📝 client/firewall/nftables/acl_linux.go (+18 -26)
client/firewall/nftables/addr_family_linux.go (+81 -0)
📝 client/firewall/nftables/manager_linux.go (+258 -29)
📝 client/firewall/nftables/manager_linux_test.go (+124 -0)
📝 client/firewall/nftables/router_linux.go (+104 -61)
📝 client/firewall/nftables/router_linux_test.go (+186 -3)
📝 client/firewall/uspfilter/allow_netbird_windows.go (+38 -15)
📝 client/firewall/uspfilter/conntrack/common.go (+5 -2)
📝 client/firewall/uspfilter/filter.go (+2 -1)

...and 44 more files

📄 Description

Describe your changes

  • Extend forwarder endpoint/ICMP/TCP/UDP handlers for IPv6 address formatting and dual-stack support
  • Add IPv6 fake IP allocation and mapping in fakeip package with tests
  • DNS upstream: bind per-interface/address instead of global, with platform-specific selection (Android, iOS, general)
  • Route manager: handle IPv6 prefixes in dynamic routes and DNS interceptor
  • Anonymizer: update IPv6 output formatting in tests
  • System route ops: add IPv6 loopback handling and forwarding checks on Linux

Stacked on #5688.

Stack

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)

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

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/667


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/5706 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 3/26/2026 **Status:** ✅ Merged **Merged:** 4/9/2026 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `client-ipv6-acl-usp` ← **Head:** `client-ipv6-routing` --- ### 📝 Commits (9) - [`da6f610`](https://github.com/netbirdio/netbird/commit/da6f61039a413b0607af1e00308a536a3940cffc) Add IPv6 routing support with forwarding, fake IPs, and exit node handling - [`a9ee25a`](https://github.com/netbirdio/netbird/commit/a9ee25aeef0a3c9289fe947ec38385bf659406af) Merge branch 'client-ipv6-acl-usp' into client-ipv6-routing - [`a3925c9`](https://github.com/netbirdio/netbird/commit/a3925c9a89f11ce807d80874c20a6203d341a05f) Merge remote-tracking branch 'origin/client-ipv6-acl-usp' into client-ipv6-routing - [`7dff0e2`](https://github.com/netbirdio/netbird/commit/7dff0e2f70e40a2461286bfb22a98e3a8bfbd5e7) Keep successful DNS answers when only one address family query fails - [`ff1838b`](https://github.com/netbirdio/netbird/commit/ff1838b65190e263439bdbd52898129d7c404c57) Merge remote-tracking branch 'origin/client-ipv6-acl-usp' into client-ipv6-routing - [`75e5d33`](https://github.com/netbirdio/netbird/commit/75e5d33da260bc1e2e3704d37805aae3acdcc6af) Merge branch 'client-ipv6-acl-usp' into client-ipv6-routing - [`521e6df`](https://github.com/netbirdio/netbird/commit/521e6df1d36b03636fb1f53479473545a0072cc8) Merge remote-tracking branch 'origin/client-ipv6-acl-usp' into client-ipv6-routing - [`b5fcdce`](https://github.com/netbirdio/netbird/commit/b5fcdce6247adaec3c340c09d20a40a8aec64bf5) Merge branch 'client-ipv6-acl-usp' into client-ipv6-routing - [`954c2c1`](https://github.com/netbirdio/netbird/commit/954c2c1d2eaeefde28f03b7db2503257c5a30e09) [client] Add dual-stack nftables manager with IPv6 table support (#5707) ### 📊 Changes **64 files changed** (+2136 additions, -542 deletions) <details> <summary>View changed files</summary> 📝 `client/android/client.go` (+60 -19) 📝 `client/android/route_command.go` (+5 -2) 📝 `client/anonymize/anonymize.go` (+9 -2) 📝 `client/anonymize/anonymize_test.go` (+7 -7) 📝 `client/cmd/ssh.go` (+2 -2) 📝 `client/cmd/ssh_test.go` (+2 -2) 📝 `client/firewall/iptables/acl_linux.go` (+28 -3) 📝 `client/firewall/iptables/manager_linux.go` (+210 -26) 📝 `client/firewall/iptables/router_linux.go` (+50 -18) 📝 `client/firewall/iptables/rule.go` (+1 -0) 📝 `client/firewall/iptables/state_linux.go` (+30 -0) 📝 `client/firewall/nftables/acl_linux.go` (+18 -26) ➕ `client/firewall/nftables/addr_family_linux.go` (+81 -0) 📝 `client/firewall/nftables/manager_linux.go` (+258 -29) 📝 `client/firewall/nftables/manager_linux_test.go` (+124 -0) 📝 `client/firewall/nftables/router_linux.go` (+104 -61) 📝 `client/firewall/nftables/router_linux_test.go` (+186 -3) 📝 `client/firewall/uspfilter/allow_netbird_windows.go` (+38 -15) 📝 `client/firewall/uspfilter/conntrack/common.go` (+5 -2) 📝 `client/firewall/uspfilter/filter.go` (+2 -1) _...and 44 more files_ </details> ### 📄 Description ## Describe your changes - Extend forwarder endpoint/ICMP/TCP/UDP handlers for IPv6 address formatting and dual-stack support - Add IPv6 fake IP allocation and mapping in `fakeip` package with tests - DNS upstream: bind per-interface/address instead of global, with platform-specific selection (Android, iOS, general) - Route manager: handle IPv6 prefixes in dynamic routes and DNS interceptor - Anonymizer: update IPv6 output formatting in tests - System route ops: add IPv6 loopback handling and forwarding checks on Linux Stacked on #5688. ## Issue ticket number and link ## Stack - #5631 - #5675 - #5686 - #5687 - #5688 - #5706 :point_left: - #5707 - #5708 ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [x] Created tests that fail without the change (if possible) > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [x] I added/updated documentation for this change - [ ] Documentation is **not needed** for this change (explain why) ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/667 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 06:07:45 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#23711