[PR #5687] [MERGED] [client] Add IPv6 support to SSH server, client config, and netflow logger #28356

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/5687
Author: @lixmal
Created: 3/25/2026
Status: Merged
Merged: 4/7/2026
Merged by: @lixmal

Base: client-ipv6-dnsHead: client-ipv6-ssh-netflow


📝 Commits (5)

  • d81cd5d Add IPv6 support to SSH server, client config, and netflow logger
  • 5a29fa8 Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow
  • 0c2fbd5 Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow
  • bc6ed1a Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow
  • 1cc19e7 Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow

📊 Changes

10 files changed (+136 additions, -44 deletions)

View changed files

📝 client/internal/engine_ssh.go (+43 -11)
📝 client/internal/netflow/conntrack/conntrack.go (+14 -9)
📝 client/internal/netflow/logger/logger.go (+9 -3)
📝 client/internal/netflow/logger/logger_test.go (+1 -1)
📝 client/internal/netflow/manager.go (+4 -3)
📝 client/internal/netflow/types/types.go (+3 -0)
📝 client/internal/rosenpass/manager.go (+1 -1)
📝 client/ssh/config/manager.go (+8 -3)
📝 client/ssh/config/manager_test.go (+5 -4)
📝 client/ssh/server/server.go (+48 -9)

📄 Description

Describe your changes

  • SSH server listens on both v4 and v6 overlay addresses, with DNAT port redirection (22→22022) for both families
  • SSH connection validator accepts connections from both overlay networks, rejects own v4/v6 IP
  • SSH client config includes v6 as host alias, GetPeerSSHKey matches by v6 address
  • Netflow conntrack and logger recognize ICMPv6 (proto 58), check both overlay networks for flow relevance and direction inference
  • Rosenpass peer endpoint uses net.JoinHostPort for correct v6 bracket formatting

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/__

Summary by CodeRabbit

  • New Features
    • Added native IPv6 support for SSH access and peer connectivity.
    • Enhanced network flow monitoring to track both IPv4 and IPv6 traffic.
    • Improved protocol handling to properly support ICMP and ICMPv6.
    • Better compatibility with dual-stack (IPv4/IPv6) network environments.

🔄 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/5687 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 3/25/2026 **Status:** ✅ Merged **Merged:** 4/7/2026 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `client-ipv6-dns` ← **Head:** `client-ipv6-ssh-netflow` --- ### 📝 Commits (5) - [`d81cd5d`](https://github.com/netbirdio/netbird/commit/d81cd5d154c67d47b6e0864f32e39d973d3a5761) Add IPv6 support to SSH server, client config, and netflow logger - [`5a29fa8`](https://github.com/netbirdio/netbird/commit/5a29fa8432a4a504b435bbe1e401fc17e3724b1a) Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow - [`0c2fbd5`](https://github.com/netbirdio/netbird/commit/0c2fbd5d70661e0f3a7c23d11c13d82b6357b8ca) Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow - [`bc6ed1a`](https://github.com/netbirdio/netbird/commit/bc6ed1a97f3c69b05f48a9d65559f115f6bc153c) Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow - [`1cc19e7`](https://github.com/netbirdio/netbird/commit/1cc19e7355f1c43c24c14ed2675d91ef1df363cd) Merge branch 'client-ipv6-dns' into client-ipv6-ssh-netflow ### 📊 Changes **10 files changed** (+136 additions, -44 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/engine_ssh.go` (+43 -11) 📝 `client/internal/netflow/conntrack/conntrack.go` (+14 -9) 📝 `client/internal/netflow/logger/logger.go` (+9 -3) 📝 `client/internal/netflow/logger/logger_test.go` (+1 -1) 📝 `client/internal/netflow/manager.go` (+4 -3) 📝 `client/internal/netflow/types/types.go` (+3 -0) 📝 `client/internal/rosenpass/manager.go` (+1 -1) 📝 `client/ssh/config/manager.go` (+8 -3) 📝 `client/ssh/config/manager_test.go` (+5 -4) 📝 `client/ssh/server/server.go` (+48 -9) </details> ### 📄 Description ## Describe your changes - SSH server listens on both v4 and v6 overlay addresses, with DNAT port redirection (22→22022) for both families - SSH connection validator accepts connections from both overlay networks, rejects own v4/v6 IP - SSH client config includes v6 as host alias, `GetPeerSSHKey` matches by v6 address - Netflow conntrack and logger recognize ICMPv6 (proto 58), check both overlay networks for flow relevance and direction inference - Rosenpass peer endpoint uses `net.JoinHostPort` for correct v6 bracket formatting ## Issue ticket number and link ## Stack - #5631 - #5675 - #5686 - #5687 :point_left: - #5688 - #5706 - #5707 - #5708 ### 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) > 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: - [ ] I added/updated documentation for this change - [x] 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/>\_\_ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added native IPv6 support for SSH access and peer connectivity. - Enhanced network flow monitoring to track both IPv4 and IPv6 traffic. - Improved protocol handling to properly support ICMP and ICMPv6. - Better compatibility with dual-stack (IPv4/IPv6) network environments. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 08:06:13 -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#28356