Knowledge Base
Searching in : Article
ID: AR04E00457
Applies to: NX Server Products
Added on: 2007-04-26
Last Update: 2025-02-07

How to set-up a basic environment to connect NX through a HTTP proxy

In order to be able to establish the connection via HTTP proxy, you need forst of all to set-up a working HTTP proxy server.

Example below is related to configure a Squid HTTP Proxy but can be easily extended to your preferred Web Proxy Server. HTTP Proxy installation instructions are however beyond the scope of this article and we strongly advise to refer to official documentation of your proxy.

Squid HTTP Proxy configuration

This configuration is suitable for NoMachine connections by SSH protocol.

Configure your Squid HTTP proxy server to allow to pass connections to the TCP port where the SSHD server is running, by default 22, and specify the domains from which connections are allowed.

If SSHD uses a different port than the default 22, you need to configure Squid accordingly.


Edit the squid.conf file and add port 22 to SSL_Ports and Safe_ports acl variables so that they look like:

acl SSL_ports port 443 22 4022 4000 4333
 
acl Safe_ports port 4022        # nxssh
acl Safe_ports port 4000        # nx
acl Safe_ports port 4333        # nxwebplayer

Then go to section http_access and add the following lines before the http_access deny all line:

acl our_network dst 192.168.0.0/24
http_access allow our_network

acl clients srcdomain .foo.com
http_access allow clients

where our_network is the destination network in which your NoMachine server is located and clients is the definition of domains from which squid will allow connections.
 

How to configure NoMachine client to use a HTTP proxy

Connections through the HTTP proxy can be enabled for the SSH protocol and the NX protocol as well.

To create a new connection:
- Click on 'Add' and enter the 'Configuration' panel.
- Select 'Use custom proxy configuration for this session' and click on Modify button.

- Provide the Proxy configuration, it can be automatic or manual.

If it's manual, select 'HTTP proxy' and provide:
- IP or hostname of the HTTP Proxy server you would like to use.
- Port on which the HTTP Proxy server is listening, default is 3128 for Squid.
- Username and Password to authenticate to the HTTP Proxy.

If you need to use the HTTP proxy for an existing connection, open the NoMachine UI -> click on the connection icon -> 'Edit connection' and enter the 'Configuration' panel as explained above.