ENGINSIGHT
WebsiteLoginKostenloser Testzugang
English
English
  • Overview
  • Features
  • Operation
    • Platform overview
    • Start Guide
    • Platform
      • Dashboard
        • Vulnerability Management
        • Operation Centers
        • My Dashboards
        • Configurations
      • Issues
      • Hosts (Pulsar Agent)
        • Pulsar Agent
        • Host details
        • Policy Manager
        • Software Inventory
        • Intrusion Detection System
        • File Integrity Monitoring
        • System events
        • Update Manager
        • Plugins
        • Machine Learning
      • Host (Pulsar-Agent) BETA
        • Pulsar Agent
        • Hostdetails
        • Softwareinventar
        • Plugins
        • Policies
        • Globale Tags
        • Tag Manager
        • System Events
        • Vulnerability Manager
        • Compliance
        • Intrusion Detection System
        • File Integrity Monitoring
        • Advanced Persistent Threats
      • Endpoints (Observer)
        • Endpoint details
        • Domains
        • Certificate Manager
        • Observer
      • Observations
      • Shield
      • Penetration Testing (Hacktor)
        • Run pentest
        • Audits
        • Audit Definitions
        • Target Groups
        • Auth-Providers
        • Hacktor
        • Custom Scripts
      • Discoveries
      • SIEM
        • Data Lake
        • Cockpits
        • Obfuscators
        • Workflows
        • Incidents
        • Extractors
        • Collectors
        • Loggernaut
        • Advanced Settings
        • Models
      • Alerts
      • Settings
      • Organisations
      • Tags
      • Searchbar
  • On-Premises
    • Requirements
    • Installation
      • Automatic Installation
      • Manual Installation
      • Load Balancing
      • SIEM
      • Deinstallation
    • Update
    • Configuration
      • HTTPS and Certificates
      • Licences and Organisations
      • Mail Server
      • 2-Factor Authentication
      • SSO via Office 365
      • Storage Times
      • White Label
      • NGINX Extractor
      • Field Level Encryption
      • Loggernaut-Configurations
  • Technical Details
    • System Requirements
      • Pulsar: Operating Systems
    • Current version numbers
    • Pentest Vectors
    • API
  • Partner section
    • Licenses and organizations
Powered by GitBook
On this page
  • Install nginx (only for manual installation).
  • Define internal ports
  • Set up Let's Encrypt
  • Configure certificates and SSL/TLS in nginx
  • With Let's Encrypt
  • With own certificate

Was this helpful?

  1. On-Premises
  2. Configuration

HTTPS and Certificates

PreviousConfigurationNextLicences and Organisations

Last updated 16 days ago

Was this helpful?

For productive use of Enginsight, an encrypted connection via HTTPS is mandatory.

For this purpose, install and configure nginx on the application server. During the automatic installation of Enginsight, nginx is already installed.

So you get the following structure:

  • Container Ports: 80, 8080

  • internal Ports: 81, 82 (127.0.0.1:81, 127.0.0.1:82)

You need two domains pointing to the IP address of the application server:

  • ngs-api.domain.de (Port 80)

  • ngs-app.domain.de (Port 443)

If you have your own certificate, you can use it. Alternatively, we recommend using Let's Encrypt.

Install nginx (only for manual installation).

If you have done a manual installation, install nginx first. If you have an automatic installation, you can skip this step.

apt install nginx

Define internal ports

Define an internal port in docker-compose.yml for the user interface (ui-m1) and API (server-m2).

1. Navigate to /opt/enginsight/enterprise

cd /opt/enginsight/enterprise

2. Open docker-compose.yml.

nano docker-compose.yml

3. Adjust the ports.

  ui-m1:
    image: registry.enginsight.com/enginsight/ui-m1:x.x.x
    ports:
    - "127.0.0.1:81:80"
    restart: always
    volumes:
    - "./conf/ui-m1/environment.js.production:/opt/enginsight/ui-m1/config/environment.js"

  server-m2:
    image: registry.enginsight.com/enginsight/server-m2:x.x.x
    networks:
    - redis
    - mongodb
    ports:
    - "127.0.0.1:82:8080"

4. Save the file (Ctrl+o) and confirm the saving process. Close nano (Ctrl+x).

5. Run setup.sh for the changes to apply.

./setup.sh

Set up Let's Encrypt

If you want to use your own certificate, skip the following steps.

1. Customize the configuration of nginx. Open the configuration file.

Automatic installation

nano /etc/nginx/sites-available/ngs.conf

Manual installation

nano /etc/nginx/sites-available/default

2. Use the following template and set your domain.

server {
        listen 80;
        listen [::]:80;

        location ~ /.well-known {
                allow all;
        }

        location / {
                return 302 https://ngs-api.domain.de
        }

        root /var/www/ngs-api.domain.de

        server_name ngs-api.domain.de
}
 server {
        listen 80;
        listen [::]:80;

        location ~ /.well-known {
                allow all;
        }

        location / {
                return 302 https://ngs-app.domain.de
        }

        root /var/www/ngs-app.domain.de

        server_name ngs-app.domain.de
}

3. Check the status of nginx and see if the change was successful.

nginx -t

4. Restart nginx.

service nginx restart

5. Install certbot.

sudo apt-get install certbot

6. Create a folder for each domain.

mkdir -p /var/www/ngs-api.domain.de
mkdir -p /var/www/ngs-app.domain.de

7. Create the certificate.

certbot certonly --rsa-key-size 4096 --webroot -w /var/www/ngs-api.domain.de -d ngs-api.domain.de
certbot certonly --rsa-key-size 4096 --webroot -w /var/www/ngs-app.domain.de -d ngs-app.domain.de

8. Generate the Diffie-Hellman parameters.

openssl dhparam -out dhparam.pem 2048

Configure certificates and SSL/TLS in nginx

With Let's Encrypt

Customize the configuration of nginx.

1. Open the configuration file.

Automatic installation

nano /etc/nginx/sites-available/ngs.conf

Manual installation

nano /etc/nginx/sites-available/default

2. Use the following template and insert your domain.

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}
server {
        listen 80;
        listen [::]:80;
 
        location ~ /.well-known {
                allow all;
        }
 
        location / {
                return 302 https://ngs-api.domain;
        }
 
        root /var/www/ngs-api.domain;
 
        server_name ngs-api.domain;
}
 
server {
        listen 80;
        listen [::]:80;
 
        location ~ /.well-known {
                allow all;
        }
 
        location / {
                return 302 https://ngs-app.domain;
        }
 
        root /var/www/ngs-app.domain;
 
        server_name ngs-app.domain;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name ngs-app.domain.de;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE+AESGCM+AES256";
    ssl_ecdh_curve secp384r1;
    ssl_session_cache shared:SSL:10m;
    ssl_session_tickets off;
    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 8.8.8.8 8.8.4.4 valid=300s;
    resolver_timeout 5s;

    ssl_dhparam /etc/nginx/dhparam.pem;
    ssl_certificate /etc/letsencrypt/live/ngs-app.domain.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ngs-app.domain.de/privkey.pem;

    client_max_body_size 200m;

    location / {
        proxy_pass http://127.0.0.1:81;
        proxy_set_header Host              $host;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-Proto "https";
        proxy_set_header X-Forwarded-Ssl   "on";
        proxy_set_header Upgrade           $http_upgrade;
        proxy_set_header Connection        $connection_upgrade;
    }

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name ngs-api.domain.de;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE+AESGCM+AES256";
    ssl_ecdh_curve secp384r1;
    ssl_session_cache shared:SSL:10m;
    ssl_session_tickets off;
    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 8.8.8.8 8.8.4.4 valid=300s;
    resolver_timeout 5s;

    ssl_dhparam /etc/nginx/dhparam.pem;
    ssl_certificate /etc/letsencrypt/live/ngs-api.domain.de/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/ngs-api.domain.de/privkey.pem;

    client_max_body_size 200m;

    location / {
        proxy_pass http://127.0.0.1:82;
        proxy_set_header Host              $host;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-Proto "https";
        proxy_set_header X-Forwarded-Ssl   "on";
        proxy_set_header Upgrade           $http_upgrade;
        proxy_set_header Connection        $connection_upgrade;
    }
}

3. Check the status of nginx and see if the change was successful.

nginx -t

4. Restart nginx.

service nginx restart

With own certificate

Please make sure that the certificate is in PEM format. If not, convert the certificate to PEM format first.

Adjust the configuration of nginx.

1. Open the configuration file.

Automatic installation

nano /etc/nginx/sites-available/ngs.conf

Manual installation

nano /etc/nginx/sites-available/default

2. Use the following template and insert your domain and the paths to the certificates.

map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name ngs-app.domain.de;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE+AESGCM+AES256";
    ssl_ecdh_curve secp384r1;
    ssl_session_cache shared:SSL:10m;
    ssl_session_tickets off;
    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 8.8.8.8 8.8.4.4 valid=300s;
    resolver_timeout 5s;

#   ssl_dhparam /etc/nginx/dhparam.pem;
    ssl_certificate /<Pfad>/fullchain.pem;
    ssl_certificate_key /<Pfad>/privkey.pem;

    client_max_body_size 200m;

    location / {
        proxy_pass http://127.0.0.1:81;
        proxy_set_header Host              $host;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-Proto "https";
        proxy_set_header X-Forwarded-Ssl   "on";
        proxy_set_header Upgrade           $http_upgrade;
        proxy_set_header Connection        $connection_upgrade;
    }

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name ngs-api.domain.de;

    ssl_protocols TLSv1.2;
    ssl_prefer_server_ciphers on;
    ssl_ciphers "ECDHE+AESGCM+AES256";
    ssl_ecdh_curve secp384r1;
    ssl_session_cache shared:SSL:10m;
    ssl_session_tickets off;
    ssl_stapling on;
    ssl_stapling_verify on;
    resolver 8.8.8.8 8.8.4.4 valid=300s;
    resolver_timeout 5s;

#   ssl_dhparam /etc/nginx/dhparam.pem;
    ssl_certificate /<Pfad>/fullchain.pem;
    ssl_certificate_key /<Pfad>/privkey.pem;

    client_max_body_size 200m;

    location / {
        proxy_pass http://127.0.0.1:82;
        proxy_set_header Host              $host;
        proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP         $remote_addr;
        proxy_set_header X-Forwarded-Proto "https";
        proxy_set_header X-Forwarded-Ssl   "on";
        proxy_set_header Upgrade           $http_upgrade;
        proxy_set_header Connection        $connection_upgrade;
    }
}

3. Check the status of nginx and see if the change was successful.

nginx -t

4. Restart nginx.

service nginx restart

Please note that LetsEncrypt is only valid for 3 Months. Follow the tu update your SSL-ceritificate.

manual