NoMachine client connects to server IP unrelated to auto-discovered IP

Forum / General Discussions / NoMachine client connects to server IP unrelated to auto-discovered IP

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #44852
    hso-iregular
    Participant

    We have many servers that have three interfaces configured with these kind of IPs, in this order as shown in the Server status tab:
    – 172.16.0.1 (static, local to server, inaccessible)
    – 172.16.10.1 (static, local to server, inaccessible)
    – 192.168.1.100 (DHCP LAN, accessible)
    These servers are all correctly auto-discovered by NoMachine clients on the DHCP LAN IP, but when you try to double-click on a server to open a remote session, it always fail with an error saying that for example “timeout trying to connect to 172.16.0.1”.

    Why does the NoMachine clients ends up trying to connect to a server on an IP that is not even accessible and on a different subnet than the one that the server was auto-discovered on?

    Is there a setting to correct/fix this? I’m aware of the NXdListenAddress setting, but we can’t really use it since we need DHCP on the LAN-accessible interface and it seems that this setting cannot be set to specify an interface name either.

    (This is a rough example, but it happens with any combination of NoMachine clients and servers OSes, where the servers have a similar interfaces and IPs configuration as stated above.)

    #44864
    Britgirl
    Keymaster

    When a NoMachine server runs on a machine, it makes a list of network interfaces, and it collects all the information (hostname, list of IPs, ports on which it is listening) and sends it on the LAN to the NoMachine clients (on the same LAN). This info is used to create an mDNS item in the list of IPs and they are transmitted to the Player. As you correctly wrote, these machines are “autodiscovered”. How does the Player know that you want to use 192.xx or whatever rather than another?

    What you can do is go in to the Player’s Configuration panel of the connection and manually choose the correct IP address from the list, by editing the mDNS machine before connecting. See https://forum.nomachine.com/topic/how-to-make-nomachine-update-target-computer-ips#post-40814

     

    #44867
    hso-iregular
    Participant

    Thanks Britgirl, somehow I wasn’t even aware that there is a “Edit connection” menu for mDNS’d servers! This is indeed a simple enough solution for now.

    Do you happen to know also if server-side, there’s perhaps a script that can be run by NoMachine to alter/filter the collected information before it is send to clients (e.g. possibly remove unwanted IPs) ?

    #44871
    Britgirl
    Keymaster

    Custom scripts are available in all NoMachine server products, but there is not one suitable for what you’d like to achieve at the moment. We are evaluating the possibility of adding it. Check out the guide here for a full list (11.3. Server Automation Interface: Custom Scripts executed on Server/Node Events) of what is available: https://kb.nomachine.com/DT07S00246
    You can achieve the same also in the free version if you are using that on the server.

    However, you could probably achieve a DHCP hook using your own system’s scripts to find and set the new IP as NXdListenAddress key in server configuration file, and then run /etc/NX/nxserver --configupdate.

    #45030
    hso-iregular
    Participant

    Thanks, I indeed considered doing it via an external script and modify the NXdListenAddress dynamically, but ultimately was wondering if it could be done via NoMachine scripting instead.

    You have my vote for the possibility of adding such server host/port filtering script!

Viewing 5 posts - 1 through 5 (of 5 total)

This topic was marked as solved, you can't post.