Hello Stan,
NoMachine retrieves the public IP and maps the port automatically when the router supports UPnP or NAT-PMP port mapping.
Information how to enable UPnP port mapping on nxserver is available here: https://www.nomachine.com/AR11L00827. Just set
EnableUPnP NX
in the
/usr/NX/etc/server.cfg
.
When IP will change you will probably not be able to connect to the server. It’s now been queued up for fixing and you can see it here: https://www.nomachine.com/TR01P08354. You can use the ‘notify me’ tool to find out when a fix has been released.
However there is a way to handle this, and make it works:
when IP will change you can use script or by hand call those 2 commands as administrator / root user:
# /etc/NX/nxserver –upnpunmap
# /etc/NX/nxserver –upnpmap
If UPnP is enabled and works on router that server machine is connected you will see as the ouput of second command external IP and Port.
Port may not changed, but those to commands called exactly in that order, will allows you to connect after IP changed.
To get only information about port mapping you can call:
# /etc/NX/nxserver –upnpstatus
the ouput will be similar to:
# /etc/NX/nxserver –upnpstatus
Local IP 192.168.1.2
Gateway IP 192.168.1.1
External IP 151.1.192.128
NX port 4000 mapped to: 151.1.192.128:29382