Configuring Virtual Host SSL or TLS on the Opmantek Virtual Machine

Your organisation may want to ensure that connection to your Opmantek server is securely encrypted. This is possible with all Opmantek software installations.

This guide will show you how you can configure a SSL/TLS connection to the Opmantek Virtual Machine using a self-signed certificate.

Note that this is a basic guide, and that you can use any SSL/TLS certificate on any server your organisation uses to run Opmantek software.


1. Open the Opmantek Virtual Machine

Open the Opmantek Virtual Machine and login using your root credentials.

The default Opmantek Virtual Machine credentials as of May 2021 are:

Username: root

Password: NM1$88

2. Generate a basic OpenSSL self-signed certificate.

OpenSSL is the most basic way to generate a self-signed certificate. You can learn more about OpenSSL here.

To generate the certificate, run the following command within the Virtual Machine:

    openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes

You will next be asked to enter your organisation's details to be displayed as part of the certificate. You can fill each of these details out, or simply hit 'Enter' on each request to keep OpenSSL's default settings.

3. Update virtual host configurations to use SSL

Edit the virtual host's configuration using the VIM editor through the following command:

    vi /etc/httpd/conf.d/04omk-proxy.conf

Within this file, navigate to the following line:

    RequestHeader set X-Forwarded-Proto "http"

Edit the line using the insert command, changing "http" to "https", so it now reads:

    RequestHeader set X-Forwarded-Proto "https"

Exit insert mode using the escape key, and save your changes by entering this command:

    :wq!

4. Get the IP address of your Virtual Machine

Run the following command:

    ifconfig | grep inet | grep -v inet6 | grep -v "127\.0\.0\.1"

This will return your Virtual Machine's local IP address, which you can now access using SSL.

For instance, if your Virtual Machine's IP address is 192.168.1.127, you will be able to access it through SSL at the following address:

https://192.168.1.127/omk/

Congratulations: you have now configured a secure SSL connection between you and Opmantek's software modules.