Securing the Node Service behind a reverse proxy
If you are going to expose asperanoded to the internet, use a reverse proxy (Nginx is provided in your installation). For example, if you want to use an HSTS instance with IBM Aspera on Cloud (AoC), as a user-managed tethered node, you must use a reverse proxy with it.
The asperanginx service can be used to reverse proxy:
- Aspera Node API calls.
- WebSocket transfers.
- HSTS HTTP fallback.
Note: These instructions are designed for the Nginx package that is included with HSTS in /opt/aspera/nginx. The service name is
asperanginx, and it is managed by systemd. If you
choose to use a different version of Nginx, you must refer to the example file /opt/aspera/nginx/conf/nginx.conf.example.
When you configure Nginx support for your system, note:
- Use the default Nginx configuration.
- The configuration example file sets up Nginx to listen on port 443. That can be changed if port 443 is already used by some other service. However, port 443 must be used if the instance is going to be used as tethered node with AoC.
- As a best practice, update all references to localhost to the fully qualified domain name that is used to access the server.
- As a best practice, use certificates signed by an official certificate authority, rather than the self-signed certificates generated by the installation process (aspera_server_cert.pem, aspera_server_key.pem). Official CA certificates are required if the HSTS instance is going to be used as tethered node with AoC.
- When a
transfer_spec
is generated for token based transfers, thewss_port
passed in thetransfer_spec
corresponds to thewss_port
configured in theaspera.conf
. For the Nginx to reverse proxy WebSocket transfers, you can configure Nginx to listen on thewss_port
. If you want to haveasperanoded
listen for traffic on a different port, make sure to configure thewss_listen_port
.For example, the
nginx.conf
would proxy toasperanoded
listening on the configuredwss_listen_port
. - The
nginx.conf
file contains alimit_rate
section that by default is configured only for the Node API, and limits to 30 requests per minute (1 request every 2 seconds). To allow more frequent access, increase to 10 requests per second. The configuration can be applied to the SSH server to limit the number of incoming SSH requests per second.