netbirdio / netbird

Connect your devices into a secure WireGuard®-based overlay network with SSO, MFA and granular access controls.
https://netbird.io
BSD 3-Clause "New" or "Revised" License
10.51k stars 472 forks source link

Netbird client host not serving web requests after some time #2238

Open hhharsha36 opened 2 months ago

hhharsha36 commented 2 months ago

I am self-hosting a Netbird co-ordination server on a ubuntu based Linode VPS environment, and use two Netbird clients where one is installed on the same Linode VPS and the other on a Raspberry Pi 4 device running Raspbian OS. Below is what my setup looks like.

netbirdIssueFlowchart

The Traefik application on Linode VPS routes web request to Raspberry Pi via Netbird where the requests are further handled by NGINX proxy manager.

Problem

The web requests to Raspberry Pi works fine initially. But after some time, it becomes unreachable upon a HTTP request. Everything works fine again as soon as I SSH into Raspberry pi via its Netbird IP from Linode VPS.

Raspberry Pi is able to serve HTTP requests made via Netbird IP throughout the period I have an active SSH session on a terminal. When I close the SSH connection, the problem reoccurs after some time. This problem occurred since the inception of my Netbird setup.

Currently, I open an SSH session to Raspberry whenever I want to access my self-hosted services which is very cumbersome. I should be able to make HTTP requests using Netbird IP without the need to constantly open a SSH connection on a separate console window.

What I have tried

  1. Initially I thought the problem was with NGINX Proxy Manager and tried replacing it Traefik. But surprisingly the problem repeated even with Traefik reverse proxy indicating that the problem is not with the web application I am using.
  2. I tried modifying the iptables as per this comment on a similar issue, but it did not help. https://github.com/netbirdio/netbird/issues/1370#issuecomment-1893488723

Both the Netbird server and clients are running on latest version 0.28.4

Below is netbird status output from Linode VPS:

Peers detail:
 rpi-home.netbird.selfhosted:
  NetBird IP: 100.78.xxx.xx
  Public key: <masked>
  Status: Connected
  -- detail --
  Connection type: P2P
  Direct: true
  ICE candidate (Local/Remote): host/prflx
  ICE candidate endpoints (Local/Remote): <masked>
  Last connection update: 33 minutes, 37 seconds ago
  Last WireGuard handshake: 1 minute, 9 seconds ago
  Transfer status (received/sent) 3.5 MiB/1.1 MiB
  Quantum resistance: false
  Routes: -
  Latency: 35.306156ms

OS: linux/amd64
Daemon version: 0.28.4
CLI version: 0.28.4
Management: Connected to https://netbird.example.com:443
Signal: Connected to https://netbird.example.com:443
Relays:
  [stun:netbird.example.com:3478] is Available
  [turn:netbird.example.com:3478?transport=udp] is Available
Nameservers:
FQDN: xx.netbird.selfhosted
NetBird IP: 100.78.xxx.xxx/16
Interface type: Kernel
Quantum resistance: false
Routes: 100.63.0.0/24
Peers count: 2/2 Connected

Below is netbird status output from Raspberry Pi:

Peers detail:
 xx.netbird.selfhosted:
  NetBird IP: 100.78.xxx.xxx
  Public key: <masked>
  Status: Connected
  -- detail --
  Connection type: P2P
  Direct: true
  ICE candidate (Local/Remote): srflx/host
  ICE candidate endpoints (Local/Remote): xxx.xxx.xxx.xxx:250xx/<Masked>:5xxxx
  Last connection update: 38 minutes, 3 seconds ago
  Last WireGuard handshake: 1 minute, 34 seconds ago
  Transfer status (received/sent) 1.2 MiB/3.8 MiB
  Quantum resistance: false
  Routes: -
  Latency: 34.435589ms

OS: linux/arm64
Daemon version: 0.28.4
CLI version: 0.28.4
Management: Connected to https://netbird.example.com:443
Signal: Connected to https://netbird.example.com:443
Relays:
  [stun:netbird.example.com:3478] is Available
  [turn:netbird.example.com:3478?transport=udp] is Available
Nameservers:
FQDN: <raspberry-pi>.netbird.selfhosted
NetBird IP: 100.78.xxx.xx/16
Interface type: Kernel
Quantum resistance: false
Routes: -
Peers count: 2/2 Connected

Any help in resolving this issue is much appreciated, thanks in advance.

hhharsha36 commented 1 month ago

I am still facing the issue. Would appreciate it if someone can help with the problem I am facing