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
11.02k stars 503 forks source link

Netbird client is not clearing resolv.conf after shutdown #742

Open ykorzikowski opened 1 year ago

ykorzikowski commented 1 year ago

Describe the problem I noticed, that on machine reboots or even when netbird is loosing connection, it fails to reconnect. Reason is, the netbird dns is still set in the resolv.conf, but netbird is not answering dns requests.

To Reproduce

  1. Installa netbird in any vm
  2. Do a dirty poweroff
  3. On reboot, netbird may fail connectiing

Expected behavior Netbird can connect to the vpn server.

NetBird status -d output: Not applicable

Possible workaround Add your vpn server to hosts file, so it will always resolve.

TSJasonH commented 9 months ago

I'd like to add we have observed similar behavior on the windows client too. In our case, the user killed the parent netbird process (and service) from task manager. Then was no longer able to connect to the VPN even after a reboot. Adding the netbird server to the hosts file was enough to get it working again.