https://netmaker.org logo
Title
t

thousands-boots-71086

03/02/2023, 10:05 PM
Is there any reason I couldn't have two netmaker hosts behind the same nat, so long as I set them to two different ports & forward those two ports appropriately? I started with this, one works, the other does not, and I'm not quite sure how to figure out why the second one is unconnectable.
j

jolly-london-20127

03/02/2023, 10:36 PM
they mount the same config files (/etc/netclient) which will cause issues
if you run them from docker and mount different folders, then it should work
t

thousands-boots-71086

03/03/2023, 12:36 AM
well, I mean, they're two separate physical hosts. Two totally different systems entirely, they just happen to be behind the same firewall.
h

handsome-lifeguard-70799

03/07/2023, 9:07 AM
@jolly-london-20127 hey Alex. Am I understanding this correctly? As of v18.+, it won't be easy to have several machines running netclient behind a single NAT gateway? Currently I have several self hosted servers and a few client desktops running netclient at one office location on v.17. Is this going to have to be rethought for v18? I will try to test soon, but sounds like it will result in quite a big change from the current setup
j

jolly-london-20127

03/07/2023, 12:25 PM
It should be the same as it is now to run multiple machines behind the same NAT. If anything, it should work much better, due to the new STUN system. And by the end of next week, we aim to have a new system for determining endpoints for machines on the same local network as well, which will be even better than that.
Here I was just referring to machines on the same physical host
@thousands-boots-71086 in this scenario it is likely that for some reason, they ended up with the same port (probably 51821). It should be avoiding this on its own, but if you change the non-functioning one's port to something else (e.g. 51822) it should work.
t

thousands-boots-71086

03/07/2023, 2:03 PM
They definitely didn't; the second one is 51822, but it won't complete the key exchange. I'll post some specifics a little later
j

jolly-london-20127

03/07/2023, 3:21 PM
strange, separate hosts with separate ports on the same network should be no problem...unless, is the problem with them communicating with each other?
t

thousands-boots-71086

03/07/2023, 7:24 PM
I did some low level testing and this has to be a problem with the network, I just set up nc so I could make arbitrary connections and the system listening on 51821 works, but the system listening on 51822 doesn't.
anyway, tl;dr: not netmaker
j

jolly-london-20127

03/07/2023, 7:27 PM
weird...can always edit the port in netmaker UI to something else if you want to test
t

thousands-boots-71086

03/07/2023, 7:55 PM
ahhhhh, figured it out - one of those systems was one I didn't set up, and I found out whomever did set it up installed firewalld. I did not check for that. 🤦‍♂️
It's working fine now.