Hello, when the NoMachine (server) computer is behind a NAT router or a firewall, NoMachine tries to use the UPnP or NAT-PMP protocol depending on what is supported by the router. This is to retrieve the public or external IP of the host machine where it’s installed and configure the router to allow a NoMachine client to connect from outside of the private network (port mapping). This port mapping service can work efficiently only when it’s enabled in the server configuration (check that this is the case) and that the router supports UPnP or NAT-PMP and can also accept commands for automatic port forwarding. In some cases port-forwarding must be manually configured.
There is an article with instructions on how to connect to NoMachine when the server is behind a NAT router or a firewall https://www.nomachine.com/AR04S01122. Please check this and follow the steps. It also explains how to enable port-mapping.
In the upcoming version major NoMachine 9, which is not that far off, we will release NoMachine Network. This will permit you to connect to your remote computer without having to do any of the above. You can see more about this here: https://www.nomachine.com/network.