https://netmaker.org logo
I think there is a bug with static ports. I always...
# server
d
I think there is a bug with static ports. I always had dynamic ports disabled and fixed to
51831
, but after update to
0.14.5
wireguard started on port
51832
which is not whitelisted and thus the node was not accessible from outside. If
netclient
couldn't bind to the port it should fail instead of using a different one
j
yes this was something we debated in this version. The way it is re-written, it will auto-increment port instead of failing.
d
ok, but even if we think most people don't have iptables/firewalls/cloud security rules set, my other hosts still tried to reach it on the static port. I guess there is somewhere a missed update of configs in the case netclient decides to use a different port
j
That does sound like a bug. @bored-island-21407 do we push a peer update if the port changes on the client side?
b
yes --> client will send a nodeupdate to server which will send peerUpdate to all other nodes
d
didn't happen to my nodes 2 times. In particular (log from a different host trying to connect to the static one):
Copy code
2022-07-09 11:45:43.190: [TUN] [nm-netmaker-vpn] Handshake for peer 2 (***:51821) did not complete after 5 seconds, retrying (try 18)
51821
- is static port set in netmaker. Really the host switched to
51822
I fixed it by changing static port to 51823 and then back to 51821
And I don't fully understand why the port was "unavailable". Netclient used it, I updated netclient, I believe netclient should reuse the same port
j
@bored-island-21407 this could be a problematic bit of our logic. The port checker will now check before making any interface change. If the interface is in use even by itself, it will increment.
d
and a bit more general question, what's the point of the
is dynamic port
switch now if netclient anyway will ignore it and assign a port dynamically? That's not what I expect when I explicitly set it to static
b
the reason it is done that way ..... if you create two networks with the same default listen port. If a single node joins both networks, if we didn't auto-increment, it would fail to create an interface for the second join
d
well, you can use next free port if ports are dynamic. But if they are static, they should remain static even if it causes issues. At least in my opinion
especially it is confusing when I open the dashboard, check ports in there, it says
51821
and
dynamic
turned off when in reality it's listening on
51822
. At the very least we should update the dashboard too
j
agreed, we may want to discuss how exactly to handle this but would you mind opening a bug?
d
5 Views