NX Server WAN port

Forum / NoMachine for Raspberry Pi / NX Server WAN port

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #18335
    robostan
    Participant

    Hi All,

    I have set up a PI2 to be a water sensor at a remote location. I have gotten everything working but I want to be able to log in remotely using NoMachine even if my internet provider changes the WAN IP. I confirmed I can get the new WAN IP by contacting the provider, but I still need to know the WAN port number for the NX Server. Does it stay the same? If not, is there a file I could check for this info? If so I could write a script to get the info and send it to me.

    I am running the latest version of NoMachine (6.1.6 for Linux) on Raspbian 6.3 (Stretch).

     

    Thanks,  Stan

     

    #18364
    Irek
    Participant

    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

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

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