How to change the listening port of nxagent?

Forum / NoMachine for Linux / How to change the listening port of nxagent?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2486
    sharajava
    Participant

    In my environment, the port 7016 is used by nxagent.

    bash-3.2$ netstat -atnp | grep 7016

    (Not all processes could be identified, non-owned process info

    will not be shown, you would have to be root to see it all.)

    tcp        0      0 0.0.0.0:7016                0.0.0.0:*                   LISTEN      31602/nxagent

    tcp        0      0 :::7016                     :::*                        LISTEN      31602/nxagent

     

    I want to change it. How to do it? Thanks.

    #2547
    Britgirl
    Keymaster
    #2621
    snejok
    Participant

    Hello, all!

    Why nxnode opens these ports?

    # netstat -anlpt |grep LISTEN |grep nxnode | sort

    tcp        0      0 0.0.0.0:7001                0.0.0.0:*                   LISTEN      20758/nxnode.bin

    tcp        0      0 0.0.0.0:7002                0.0.0.0:*                   LISTEN      26853/nxnode.bin

    tcp        0      0 0.0.0.0:7003                0.0.0.0:*                   LISTEN      16466/nxnode.bin

    tcp        0      0 0.0.0.0:7004                0.0.0.0:*                   LISTEN      21998/nxnode.bin

    # nmap <IP>

    Host is up (0.0033s latency).

    Not shown: 988 closed ports

    PORT     STATE    SERVICE

    22/tcp   open     ssh

    113/tcp  filtered auth

    631/tcp  open     ipp

    4000/tcp open     remoteanything

    7001/tcp open     afs3-callback

    7002/tcp open     afs3-prserver

    7004/tcp open     afs3-kaserver

    7007/tcp open     afs3-bos

    7019/tcp open     unknown

    7025/tcp open     unknown

    7070/tcp open     realserver

    7100/tcp open     font-service

     

    # telnet <IP> 7002

    Trying <IP>…

    Connected to <IP>.

    Escape character is ‘^]’.

    ^]

    telnet> quit

    Connection closed.

     

    #2940
    graywolf
    Participant

    tcp        0      0 0.0.0.0:7001                0.0.0.0:*                   LISTEN      20758/nxnode.bin

    tcp        0      0 0.0.0.0:7002                0.0.0.0:*                   LISTEN      26853/nxnode.bin

    tcp        0      0 0.0.0.0:7003                0.0.0.0:*                   LISTEN      16466/nxnode.bin

    tcp        0      0 0.0.0.0:7004                0.0.0.0:*                   LISTEN      21998/nxnode.bin

    Those ports are the TCP X11 display ports. You have four node processes. Each node is listening on a different X11 display.

    In X11, the port number and the display have a fixed offset of 6000, that is TCP Port = Display Number + 6000.

    So that, those nodes are listening on X11 displays :1001, :1002, :1003, :1004. NoMachine is set to begin display count at 1001. New node processes will get progressive numbers.

    #3699
    tired
    Participant

    Is there any way to reconfigure this behavior, perhaps the base port?  I have a port conflict with another service that I have to run on 7001, which is kind of a deal breaker.

    #3700
    tired
    Participant

    Solved.  edit /usr/NX/etc/server.cfg

    Uncomment DisplayBase, and set to something other than 1001.

    (e.g. DisplayBase = 1004)

    now nxnode display ports are 7004, etc., avoiding 7001

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

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