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.09k stars 444 forks source link

Linux peer cannot connect to other peers, for no apparent reason #1787

Open acarstoiu opened 3 months ago

acarstoiu commented 3 months ago

Describe the problem

I'm using the free cloud plan of Netbird since before there were any paid plans and the serice was in its early days. Never had any connection problems with the other peers, in spite of the fact that there's no package for my distribution, Gentoo. But after upgrading from 0.25.3 to 0.26.7 my peer is unable to connect to other peers. Initially the service complained in its log file about being unable to instantiate an "eBPF proxy" using the kernel or some user space replacement. I've read this article and configured my kernel according to the needs, which made the log file look like this (log level set to trace):

2024-04-01T19:32:45+03:00 INFO client/cmd/service_controller.go:24: starting Netbird service
2024-04-01T19:32:45+03:00 TRAC client/server/server.go:184: running client connection
2024-04-01T19:32:45+03:00 INFO client/cmd/service_controller.go:64: started daemon server: /var/run/netbird.sock
2024-04-01T19:32:45+03:00 INFO client/internal/connect.go:96: starting NetBird client version 0.26.7
2024-04-01T19:32:45+03:00 DEBG client/internal/connect.go:157: connecting to the Management service api.netbird.io:443
2024-04-01T19:32:46+03:00 DEBG client/internal/connect.go:165: connected to the Management service api.netbird.io:443
2024-04-01T19:32:47+03:00 DEBG signal/client/grpc.go:92: connected to Signal Service: signal.netbird.io:443
2024-04-01T19:32:47+03:00 DEBG client/internal/wgproxy/proxy_ebpf.go:37: instantiate ebpf proxy
2024-04-01T19:32:47+03:00 DEBG client/internal/ebpf/ebpf/wg_proxy_linux.go:11: load ebpf WG proxy
2024-04-01T19:32:47+03:00 INFO client/internal/wgproxy/proxy_ebpf.go:80: local wg proxy listening on: 3128

No sign of any malfunction, as you can see. Any ideas ❓

To Reproduce

Simply start the netbird service and notice that the local peer is not connected, both according to the GUI app and to the admin page at https://app.netbird.io/peers (which shows another peer as being online).

Expected behavior

To get connected to other peers.

Are you using NetBird Cloud?

Yes..

NetBird version

See below.

NetBird status -d output (redacted):

# netbird status -d
Peers detail:
Daemon version: 0.26.7
CLI version: 0.26.7
Management: Connected to https://api.netbird.io:443
Signal: Connected to https://signal.netbird.io:443
Relays:
Nameservers:
FQDN: {xxxx}.netbird.cloud
NetBird IP: 100.67.{xx}.{xx}/16
Interface type: Kernel
Quantum resistance: false
Routes: -
Peers count: 0/0 Connected
acarstoiu commented 3 months ago

✅ Downgrading to 0.25.3 makes things work again.

bcmmbaga commented 3 months ago

Hello! Could you please provide the logs from your connection attempt using version 0.26.7? Additionally, could you share the output of netbird status -d?

acarstoiu commented 3 months ago

Already did that, read above again.

bcmmbaga commented 3 months ago

Can you test version 0.27.0 to see if it fixes the issue?

acarstoiu commented 3 months ago

Luckily, this brand new version works. Still, there are a few things in the log file that I do not understand:

2024-04-04T18:29:10+03:00 DEBG client/firewall/create_linux.go:51: creating an nftables firewall manager
2024-04-04T18:29:10+03:00 WARN client/firewall/nftables/route_linux.go:69: table 'filter' not found for forward rules
2024-04-04T18:29:10+03:00 DEBG iface/tun_kernel_linux.go:110: bringing up interface: wt0
2024-04-04T18:29:10+03:00 DEBG iface/tun_kernel_linux.go:130: device is ready to use: wt0
2024-04-04T18:29:10+03:00 INFO client/internal/dns/host_linux.go:68: System DNS manager discovered: file
...
2024-04-04T18:29:11+03:00 DEBG client/internal/dns/service_listener.go:69: starting dns on 100.67.198.217:53
2024-04-04T18:29:11+03:00 ERRO client/internal/dns/server.go:323: unable to configure DNS for this peer using file manager without a nameserver group with all domains configured
  1. What's with the table 'filter' not found for forward rules ?
  2. What's a nameserver group with all domains configured ? My /etc/resolv.conf is managed by dhcpcd.

Thank you.