Documentation for C-Werk 2.0.

Previous page Consolidating the Servers from different networks into Domain  Connecting the Web and Mobile Clients to the Server behind NAT Next page

To connect the Client to the Server behind NAT, do the following:

  1. On the Server, set the port range for operation. By default, the base port is 20111, and the port range is 20111-20210 (see Ports used by the C-Werk Software Package).

  2. Open the port range 27000–35000 on the Server (see Ports used by the C-Werk Software Package).

    Attention!

    If you do not open the port range 27000–35000 on the Server, there will be a problem with receiving the events to the Client from the Server. To solve the problem, create the NGP_POLL_EVENTS system variable on the Client and set its value to 1 (see Appendix 9. Creating system variable).

  3. Set the router public IP address (see Network settings utility).

    Attention!

    The router public IP address should be static.

  4. On the router, forward the specified Server ports and the gRPC API 20109 port.

  5. Launch the Client and specify the router external IP address and the Server external base port in the connection settings (see Starting C-Werk Client).

    Attention!

    When connecting the Client from an external network, only those Servers that have access to the external network will be available in the Domain configuration (see Consolidating the Servers from different networks into Domain).

Example.

To connect the Client to the Servers behind NAT, do the following:

  1. On the Server 1, set the port range 20111-20210 and the router public IP address.
  2. On the Server 2, set the port range 20211-20310 and the router public IP address.
  3. On the Server 3, set the port range 20311-20410 and the router public IP address.
  4. On the Server 1, 2 and 3, open the port range 27000–35000 and create the NGP_POLL_EVENTS system variable on the Client.
  5. On the router, configure the forwarding of:
    1. The router ports 20111-20210 to the internal IP address of the Server 1 and ports 20111-20210.
    2. The router ports 20211-20310 to the internal IP address of the Server 2 and ports 20211-20310.
    3. The router ports 20311-20410 to the internal IP address of the Server 3 and ports 20311-20410.
    4. The gRPC API 20109 port (always static) to the internal IP addresses of the Server 1, 2 and 3.
  6. When connecting the Client, enter the router public IP address and port:
    1. port 20111 to connect to the Server 1.
    2. port 20211 to connect to the Server 2.
    3. port 20311 to connect to the Server 3.
  • No labels