Skip to content

Default value for Wireguard port is 0 but help says 51820 #4557

@saule1508

Description

@saule1508

Describe the problem

When you install netbird, it creates a config file with a value of "WgPort" set to 0. When you do netbird up --help it says the default value for WireguardPort is 51820.

To Reproduce
Install netbird on linux then look at the generated config:

grep WgPort /var/lib/netbird/default.json
    "WgPort": 0,

type netbird up --help, it says

--wireguard-port uint16 WireGuard interface listening port (default 51820)

Expected behavior

I think after a first install of netbird the value should be 51820. But it takes this value of ConfigInput in client/internal/profilemanager/config.go which is a pointer to an Int and default to nil. It should probably initialize with the value of DefaultWgPort in client/iface/iface.go

Are you using NetBird Cloud?

no

NetBird version

58.0.2

Is any other VPN software installed?

no
Debug output

To help us resolve the problem, please attach the following anonymized status output

netbird status -dA

Create and upload a debug bundle, and share the returned file key:

netbird debug for 1m -AS -U

Uploaded files are automatically deleted after 30 days.

Alternatively, create the file only and attach it here manually:

netbird debug for 1m -AS

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Have you tried these troubleshooting steps?

  • Reviewed client troubleshooting (if applicable)
  • Checked for newer NetBird versions
  • Searched for similar issues on GitHub (including closed ones)
  • Restarted the NetBird client
  • Disabled other VPN software
  • Checked firewall settings

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingclient

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions