Publish via HTTPS reverse proxy
April 2022
The following configuration examples and explanations are intended to help you set up and configure the UCServer and set up the ProCall Mobile Apps for external access (outside the local network).
They do not concern the estos software itself and are therefore provided without guarantee and without support by estos GmbH.
Which HTTPS reverse proxy can I use?
In principle, all standard-compliant HTTP reverse proxy servers can be used, which enable HTTP GET and POST and web socket connections (RFC 6455).
As an aid, the setting up of two different proxy servers is described here. Depending on skills and preferences, both Microsoft Windows and Linux can be chosen as the operating system.
Microsoft Windows compatible
- Microsoft Internet Information Services (IIS)
Linux compatible
- nginx
What must I configure in the UCServer?
Set IP ports
In the UCServer administration you can view and change the network settings of the UCServer in the menu under Tools >> Network interfaces. In the standard setting, the UCServer answers queries via HTTP on port 7224 and HTTPS on port 7225. Normally, this setting does not need to be changed.
Store SSL certificate
In the case of an HTTP reverse proxy, all internet requests are first received by the proxy and then forwarded to the UC WebService, so the proxy is also responsible for the encryption of the connection. We strongly recommend the use of HTTPS with a trusted SSL certificate. If necessary, request an SSL certificate for your DNS name from a public certification authority. If you work with a self-signed certificate ("Self Signed Certificate"), the connection is encrypted but not secure and the use of browser applications is not possible.
Depending on your requirements, you can forward the requests within your LAN via unencrypted HTTP or with TLS encryption. If you also prefer an encrypted connection within your LAN, you can store a certificate in PFX format in the UCServer administration in the menu under Tools >> Network interfaces >> WebService HTTPS.
Configuration examples HTTP reverse proxy
Microsoft Internet Information Services (IIS)
Requirements
- Microsoft Internet Information Services (IIS) from Version 10
- WebSocket Protocol Feature for IIS
- Application Request Routing (ARR) from Version 3
(https://www.iis.net/downloads/microsoft/application-request-routing) - URL Rewrite Module for IIS from Version 2
(https://www.iis.net/downloads/microsoft/url-rewrite)
Installation and preparation Microsoft Internet Information Services (IIS)
- Install Microsoft Internet Information Services (IIS) on the desired server. To do this, either download the installation package or add the role via the server administration.
- Add the WebSocket Protocol feature.
- Install the URL Rewrite Module.
- Install the Application Request Routing (ARR) package.
- Configuration Microsoft Internet Information Services (IIS)
- To establish the proxy function, the next step is to set up all components involved and configure them according to your infrastructure.
Configure SSL certificate
It is recommended to use a trusted SSL certificate. Set up a server certificate for the IIS as suggested by Microsoft: https://technet.microsoft.com/en-us/cc731977
Setting up a reverse proxy website
- Add a new website.
- Fill in the required fields.
- The path specification is not particularly relevant, since no web page is delivered. The IIS will still create a web.config file. estos recommends the path:
C:\inetpub\wwwroot\ReverseProxy.
- Use https as the binding type.
- Enter the hostname that corresponds to your DNS entry and certificate.
- Select the previously-stored certificate.
- The path specification is not particularly relevant, since no web page is delivered. The IIS will still create a web.config file. estos recommends the path:
- URL – Double-click on the newly created web page and open URL Rewrite.
- Click Add Rule(s)... and select Reverse Proxy.
- If you receive the following warning "Proxy Functionality must be enabled... ", confirm with OK.
- Configure Rewrite Module: In the next dialog, specify where the requests are to be redirected to.
Under Inbound Rules, enter the DNS name or the IP address to which the requests are to be redirected (e.g. UCServer, Firewall). Also, add the desired port.
- If you activate SSL Offloading, the requests are forwarded unencrypted. For the rest of this documentation, it is assumed that the option has been activated.
- Add two rules to the top. First forward websocket traffic and second forward normal traffic with the following rules:
Pattern | Action Type | Action URL |
---|---|---|
^(.+)s://<DNS NAME>(:443)?/ws/client/(.*) | Rewrite | {R:1} ://<REWRITE TARGET>:<REWRITE TARGET PORT>/ws/client/{R:3} |
^(.+)s://<DNS NAME>(:443)?/(.*) | Rewrite | {R:1} ://<REWRITE TARGET>:<REWRITE TARGET PORT>/{R:3} |
nginx
Installation in nginx
Install nginx via the package management of your Linux distribution, e.g. on Ubuntu:
$ sudo apt-get update
$ sudo apt-get install nginx
Configuration nginx
In /
etc/nginx/sites-Available
, create a new configuration file with the name reverseproxy and copy the sample configuration described below to the file.- It is recommended to use a trusted SSL certificate. Complete the SSL configuration according to http://nginx.org/en/docs/http/configuring_https_servers.html.
- In the example, exchange <
DNS NAME
> with your DNS entry, <REWRITE TARGET
> with the desired forwarding destination and <PORT
> with the configured port. - Activate the configuration by creating a symbolic link to the configuration file in
/etc/nginx/sites-enabled
:$ cd /etc/nginx/sites-enabled
$ sudo ln -s /etc/nginx/sites-Available/reverseproxy reverseproxy
- Restart the nginx service.
sudo systemctl restart nginx.service
orsudo service nginx restart
Sample configuration nginx
|