[PR #1467] [MERGED] Add support for setting interface name and wireguard port #13761

Closed
opened 2026-08-05 02:08:58 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1467
Author: @mlsmaycon
Created: 1/15/2024
Status: Merged
Merged: 1/15/2024
Merged by: @mlsmaycon

Base: mainHead: change-iface-name-port


📝 Commits (2)

  • e4684ee Add support for setting interface name and wireguard port
  • a2db272 use uint16 for port flag

📊 Changes

6 files changed (+240 additions, -134 deletions)

View changed files

📝 client/cmd/root.go (+5 -1)
📝 client/cmd/up.go (+41 -1)
📝 client/internal/config.go (+25 -3)
📝 client/proto/daemon.pb.go (+153 -129)
📝 client/proto/daemon.proto (+5 -0)
📝 client/server/server.go (+11 -0)

📄 Description

Describe your changes

This PR adds support for setting the wireguard interface name and port with the netbird up command

e.g.:
Setting custom interface name:

netbird down
netbird up --interface-name utun101

Setting custom Wireguard port:

netbird down
netbird up  --wireguard-port 51822

Setting custom interface name and port with environment variables:

netbird down
export NB_INTERFACE_NAME=utun103 
export NB_WIREGUARD_PORT=52000
netbird up

Setting custom interface name and port in foreground:

sudo netbird up -F --interface-name utun101  --wireguard-port 51822

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

🔄 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/1467 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 1/15/2024 **Status:** ✅ Merged **Merged:** 1/15/2024 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `change-iface-name-port` --- ### 📝 Commits (2) - [`e4684ee`](https://github.com/netbirdio/netbird/commit/e4684eeac7029dea842a08a18f0c17e7614b52aa) Add support for setting interface name and wireguard port - [`a2db272`](https://github.com/netbirdio/netbird/commit/a2db2721aa78ba421cad50ed04c12ad1ab971554) use uint16 for port flag ### 📊 Changes **6 files changed** (+240 additions, -134 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/root.go` (+5 -1) 📝 `client/cmd/up.go` (+41 -1) 📝 `client/internal/config.go` (+25 -3) 📝 `client/proto/daemon.pb.go` (+153 -129) 📝 `client/proto/daemon.proto` (+5 -0) 📝 `client/server/server.go` (+11 -0) </details> ### 📄 Description ## Describe your changes This PR adds support for setting the wireguard interface name and port with the `netbird up` command e.g.: **Setting custom interface name**: ```shell netbird down netbird up --interface-name utun101 ``` **Setting custom Wireguard port**: ```shell netbird down netbird up --wireguard-port 51822 ``` **Setting custom interface name and port with environment variables**: ```shell netbird down export NB_INTERFACE_NAME=utun103 export NB_WIREGUARD_PORT=52000 netbird up ``` **Setting custom interface name and port in foreground**: ```shell sudo netbird up -F --interface-name utun101 --wireguard-port 51822 ``` ## Issue ticket number and link ### 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 --- <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 02:08:58 -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#13761