gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.5k stars 552 forks source link

[Bug]: Netclient switches to a different port with dynamic ports disabled #1370

Closed Dim0N22 closed 2 years ago

Dim0N22 commented 2 years ago

Contact Details

No response

What happened?

I have a few servers running in different clouds. The servers have static IPs so I disabled Dynamic Endpoints. Clouds also usually have strict default security rules, so I whitelisted just required ports and disabled Dynamic Ports in the Netmaker dashboard, i.e. both IPs and ports for my nodes are static. After updating to 0.14.5 I lost connectivity to most of my nodes. After quick investigation I found that nectlient decided to switch from my manually set port to a different one (static port + 1, 51831 switched to 51832). Other instances, it seems, didn't know of the port change and continued trying to reach the old static port set in the dashboard (51831). Additionally, the static port really was in use by netclient itself, so netclient should have been able to reuse it after update.

The issues here:

  1. If ports are set to static, netclient shouldn't change them as there is a reason administrator set them to static (iptables/firewalls/etc);
  2. If netclient decides to use a different port, it should update dashboard and other nodes;
  3. netclient should be able to reuse the same port after update.

Version

v0.14.5

What OS are you using?

Linux, Windows

Relevant log output

No response

Contributing guidelines

afeiszli commented 2 years ago

Fixed via hotfix yesterday. Update your client binaries and this problem should be solved.