Self signing CA certificate
To secure communication between the gateway and your server, you will need SSL/TLS certificates. The most robust approach is to use a certificate signed by a trusted Certification Authority. However, for demonstration purposes, we will generate and use self-signed certificates.
Before you start
Ensure that OpenSSL is installed on your computer (it is included with Git, so you likely have it already).
Register a domain name and point it to the IP address of the server that will receive data from the gateway.
Set up
Generate a private key
Open the command line and navigate to the folder where OpenSSL is installed (e.g., Git\usr\bin). Then run:
openssl genrsa -out rootCA.key 2048This command generates a 2048-bit private key and saves it in a file named rootCA.key in the current directory. This key will later be used to sign all certificates.
Generate the server certificate and key pair
Generate the server’s key pair and certificate signing request:
openssl req -new -newkey rsa:2048 -nodes -keyout server.key -out server.csrImportant: When prompted, make sure to enter the correct domain name or IP address of your server.

Next, sign the server certificate with the root certificate:
openssl x509 -req -in server.csr -CA rootCA.pem -CAkey rootCA.key -CAcreateserial -out server.crt -days 365Update the server application to support HTTPS
Your server application must support HTTPS communication. How you enable this depends on the programming language and framework you are using.
For example Python’s Flask framework supports HTTPS natively. Copy server.crt and server.key into your project folder, then update your app.run() call:
app.run(host='0.0.0.0', port=5000, ssl_context=('server.crt', 'server.key'))This enables encrypted HTTPS communication.
Configure the Efento Gateway to use HTTPS
Ethernet gateway
Log in to the gateway and go to: Settings → Server
Enter your server’s domain in Server address, specify the port number, enable TLS, and click Save.

LTE gateway
From this point on, the gateway will send all data using secure HTTPS communication.
Last updated

