Skoči na vsebino

Installation of the Mediation Controller servers of a multi-node platform

Note

As a reminder, switching to root on Debian machines must be done with the following command:

1
su -

The instructions on this page are to be performed on each Mediation Controller server of the platform (each node), unless stated otherwise. Each node is first installed as a Standalone Mediation Controller, then joins the other nodes.

Values used on this page

The following values are used in several commands and configuration files of this page. Enter them here: the commands displayed on this page are updated as you type.
A value used by a single command is entered in a table placed just before that command.

Value Variable Definition
IP_MC_WEB Main IP address of the Mediation Controller: the web consoles are reached through it.
IP_MC_SSL Secondary IP address of the Mediation Controller: the SSL Router is reached through it.

Downloading the mirror and necessary tools

The CyberElements Bastion 4.7 mirror and the Systancia repository signature key for Debian 13 can be downloaded from this link (requires the creation of a client account): Systancia Marketplace

In addition to the mirror and key, third-party tools will be required for the installation process:

  • An SSH client (on Windows, you can use PuTTY)
  • An SCP client (on Windows, the WinSCP or FileZilla tools can be used)

Use the SSH client to connect remotely to your server.

Use the SCP client to transfer files to your remote machine.

Preparing for installation

Configuration of the network

It is essential to configure a static network address for the Mediation Controller. To do this, you first need to retrieve the name of your machine's network interface. Run the following command as root:

1
ip -br a | grep -ve "^lo"

This command displays the name of the network interface, its status, and the IP addresses assigned to the interface.

Example

After the command is executed, the following output is displayed:

1
ens192           UP             10.0.10.10/24

The name of the network interface is ens192.

Once the network interface name has been obtained, it is now possible to edit the machine's network configuration.
Edit the /etc/network/interfaces file to modify it using the following template:

Value Variable Definition
INTERFACE_NAME Name of the network interface, retrieved with the previous command.
NETMASK Network mask associated with the IP addresses.
NETWORK_GATEWAY Default network gateway.
IP_DNS_1 IP address of the DNS server.
IP_DNS_2 IP address of a second DNS server (optional: left empty, it disappears from the configuration).
DNS_SUFFIX DNS suffix to use; without a suffix, delete the dns-search line.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto INTERFACE_NAME
iface INTERFACE_NAME inet static
    address IP_MC_WEB
    netmask NETMASK
    gateway NETWORK_GATEWAY
    dns-nameservers IP_DNS_1 IP_DNS_2
    dns-search DNS_SUFFIX

# The secondary network interface
auto INTERFACE_NAME:1
iface INTERFACE_NAME:1 inet static
    address IP_MC_SSL
    netmask NETMASK
Example
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
    address 10.0.10.10
    netmask 255.255.255.0
    gateway 10.0.10.254
    dns-nameservers 10.0.10.100 10.0.10.101
    dns-search domain.local

# The secondary network interface
auto eth0:1
iface eth0:1 inet static
    address 10.0.10.11
    netmask 255.255.255.0

Before applying the configuration, there are three more steps to complete.

The first is to install the resolvconf package so that the DNS configuration specified in the previous file can be applied:

1
apt install -y resolvconf

The second is to check the configuration of the /etc/hosts file with regard to the machine's primary IP address (IP_MC_WEB).
To do this, edit the /etc/hosts file: after the Debian installation, its second line holds the address 127.0.1.1 followed by the machine name. Replace this address with IP_MC_WEB, so that the second line is in the following format:

Value Variable Definition
FQDN Fully qualified name of the machine (name and domain); without a domain, delete it from the line.
MACHINE_NAME Short name of the machine.
2
IP_MC_WEB  FQDN    MACHINE_NAME
Example

If the machine is named MEDIATION-CONTROLLER without belonging to a domain and its IP address IP_MC_WEB is 10.0.10.10, then the file would be completed as follows:

2
10.0.10.10  MEDIATION-CONTROLLER

If the machine belongs to the DOMAIN.LOCAL domain, then the file would be completed as follows:

2
10.0.10.10  MEDIATION-CONTROLLER.DOMAIN.LOCAL   MEDIATION-CONTROLLER

Attention!

An incorrect configuration of the file may cause an error when installing the collectd package.

Finally, restart the server to load the new network configuration. Restarting the networking service is not enough: the address obtained by DHCP during the Debian installation is only released by a restart.

1
reboot

Configuring the APT package manager

Upload the files downloaded from the Systancia Marketplace to the /tmp/ directory on the server using an SCP client:

  • systancia.gpg
  • cleanroom-4.7.0-build75.1097.D13-full_auto.tgz

Log in to the server as root, then run the following commands to unzip the Systancia repository, configure its use in APT, and authenticate it.

1
2
3
4
5
6
mv /tmp/systancia.gpg /etc/apt/trusted.gpg.d/
mkdir -p /opt/systancia/repository/
tar xvzf /tmp/cleanroom-4.7.0-build75.1097.D13-full_auto.tgz -C /opt/systancia/repository/
rm /tmp/cleanroom-4.7.0-build75.1097.D13-full_auto.tgz
echo "deb file:///opt/systancia/repository/ trixie ipdiva" > /etc/apt/sources.list.d/systancia.list
apt update

We strongly recommend disabling the installation of unnecessary packages when running apt commands. To do so, run the following command:

1
echo -e 'APT::Install-Recommends false;\nAPT::Install-Suggests false;' > /etc/apt/apt.conf.d/99norecommends

Then update the Debian packages already installed on the server:

1
2
apt update
apt dist-upgrade -y

Recommendation

The security hardening guide details the integrity check of the packages and of the APT repositories, and the automation of Debian security updates: see R6 and R7.

Checking for the presence of the en_US.utf8 locale

Installing the Mediation Controller server requires the generation of en_US.utf8 locales.
To check whether they have already been generated on the server, run the following command as root:

1
locale -a  | grep en_US.utf8

If the command response displays en_US.utf8, proceed to the next step. Otherwise, run the following commands to add this locale to the machine:

1
2
sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/" /etc/locale.gen
locale-gen

Removing the systemd-timesyncd package

The Mediation Controller synchronises its clock with NTPsec, which cannot coexist with the systemd-timesyncd service present on some Debian 13 installations. If this package is installed, the installation of the Mediation Controller components fails. Remove it beforehand with the following command as root (it has no effect if the package is absent):

1
apt remove -y systemd-timesyncd

Installation of the Mediation Controller server

Installation of basic components

Start installing the components using the following command as root:

1
apt install -y ipdiva-base

After downloading all dependencies, a window will open asking you to select the server type. Select mediation:

Then select the Standalone installation mode: each node of a multi-node platform is installed as a Standalone server.

Then enter the port that the SSL Router will listen on (usually 443), the web access address of the node (IP_MC_WEB) and the IP address of its SSL Router (IP_MC_SSL), as for a Standalone Mediation Controller.

The values entered are recorded in /etc/ipdiva.conf. Check them:

1
cat /etc/ipdiva.conf
Example for a standalone Mediation Controller
1
2
3
4
5
6
hostType=mediation
loadBalancingMode=standalone
IPdivaHttpsPort=443
IPdivaSslRouterPort=443
HTTPS_ADDRESS="10.0.10.10"
SSL_ADDRESS="10.0.10.11"
What should I do if there is an error?

If there is an error in the information you entered, continue installing the ipdiva-base package and then use the following command to reconfigure the server:

1
dpkg-reconfigure ipdiva-base

Installation of specific components

Start installing the CyberElements Bastion components with the following command:

1
apt install -y cleanroom-only-server

During the installation, a window asks for the initial password of the super-user account (SU) of the CyberElements Bastion system console (/system), then for its confirmation. This password is the one used for the first connection to the system console.

The password should be at least 10 characters long and contain at least one lowercase letter, one uppercase letter, one digit and one special character. If it does not meet these criteria, a second window asks whether to keep it anyway (Use weak SU password): answer No to enter another one.

Note

The window only appears if no SU password is defined yet on the server: a reinstallation or an upgrade of the packages does not ask for it again.

Information

The multi-node architecture is documented for the installation without the CyberElements Gate console.

The server must be restarted to complete the installation:

1
reboot

Installation of drivers for connecting to Microsoft SQL Server databases

If you want to connect to an external database and it is a Microsoft SQL Server, then additional ODBC drivers must be installed.

Two versions are available: version 17 and version 18.

TLS connection required for drivers in version 18

Using ODBC 18 drivers requires that the connection be encrypted using TLS. To do this, you need to configure MS SQL Server for connection encryption.

The Mediation Controller checks the certificate of SQL Server against the certification authorities known to Debian: on each Mediation Controller server, add the certification authority that issued this certificate (PEM format, .crt extension), as root:

1
2
cp <authority>.crt /usr/local/share/ca-certificates/
update-ca-certificates

The Edge Gateways of a tunnel do not need it: they relay the connection without decrypting it.

Before starting the installation of ODBC drivers, you must prepare the Microsoft repository for Debian 13. The packages-microsoft-prod package provided by Microsoft declares this repository and installs its signature key:

1
2
3
4
5
apt install -y curl
curl -sSL -O https://packages.microsoft.com/config/debian/13/packages-microsoft-prod.deb
dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
apt update

Next, install the drivers according to the selected version and configure the system to use the sqlcmd command:

1
2
ACCEPT_EULA=Y apt install -y msodbcsql17 mssql-tools
ln -sfn /opt/mssql-tools/bin/sqlcmd /usr/bin/sqlcmd
1
2
ACCEPT_EULA=Y apt install -y msodbcsql18 mssql-tools18
ln -sfn /opt/mssql-tools18/bin/sqlcmd /usr/bin/sqlcmd

The ODBC drivers are now correctly installed.
If the Mediation Controller server has access to an MS SQL server, the following command should allow the connection to the remote server:

Value Variable Definition
MSSQL_SERVER DNS name or IP address of the MS SQL server.
MSSQL_INSTANCE Name of the instance to connect to (optional: left empty, it disappears; then also delete the backslash).
MSSQL_PORT Connection port of the MS SQL database instance.
MSSQL_USER Username used to establish the connection.
1
sqlcmd -S MSSQL_SERVER\MSSQL_INSTANCE,MSSQL_PORT -U MSSQL_USER
Examples

If the Mediation Controller server has access to an MS SQL database server via the IP address 10.0.10.100, the instance to be accessed is listening on the port 1433, and the access account is sql-user. Then the connection command is as follows:

1
sqlcmd -S 10.0.10.100,1433 -U sql-user

If the connection instance named MSSQLINSTANCE had to be specified, the command would be modified as follows:

1
sqlcmd -S 10.0.10.100\MSSQLINSTANCE,1433 -U sql-user

Configuration of an NTP time server

Recommendation

The security hardening guide details the recommended NTPsec configuration, the control of the time sources and the associated flows: see R24.

It is recommended to set up a time server to keep the system clock up to date, identical on all nodes. The necessary steps are described on the NTP configuration page.

Connecting the nodes to the default database

All the nodes use the same system configuration database, named default, hosted on the external PostgreSQL server.

The database server, the connection role and the default database must exist beforehand: see the database prerequisites of a multi-node platform.

On each node, edit the /etc/ipdiva/care/databasesettings.ini file so that it contains the following entries:

Value Variable Definition
DB_USERNAME Username used to connect to the database.
DB_PASSWORD Password of this user.
DB_HOST IP address or DNS name used to connect to the database (127.0.0.1 with a connection via Edge Gateways).
DB_PORT Port used to connect to the database instance (1432 with a connection via Edge Gateways, 5432 by default with PostgreSQL).
1
2
3
4
5
6
7
8
[database]

ENGINE:django.db.backends.postgresql
NAME:default
USER:DB_USERNAME
PASSWORD:DB_PASSWORD
HOST:DB_HOST
PORT:DB_PORT

Initialise the database with the following commands, on one node only:

1
2
cd /var/lib/ipdiva/care/
python3 manage.py migrate

Then, on each node, restart the Apache2 service and the password rotation service:

1
2
systemctl restart apache2
systemctl restart cleanroom-vault

Initial configurations of each node

Password of the system console

The super-user account (SU) of the system console is unique for the platform: it is stored in the default database, where it is created at the first access to a system console after the connection of the nodes to this database. On every node, its password is therefore the one set during the installation of the node whose system console is opened first; the passwords entered during the installation of the other nodes are not used.

Before joining the nodes together, each node must be configured from its own system console (https://IP_MC_WEB/system), with the password of the super-user account (SU):

On each Mediation Controller, run /usr/local/ipdiva/bin/disable_watchdog_zope.py.

Joining the multi-node platform

On each node, connect over SSH and run the following command as root:

Value Variable Definition
PORT_MC_SSL Listening port of the SSL Router of the Mediation Controller (usually 443).
1
/usr/local/ipdiva/bin/clrcluster_joincluster.py --ssh-address IP_MC_WEB --gateway-address IP_MC_SSL:PORT_MC_SSL

The SSH address is an address of the node itself through which the other nodes reach it. The address and port of the SSL Router are those indicated in the licence of the node: the Edge Gateways connect to them to reach this node, and pairing an Edge Gateway gives them to the instance that it creates for the node (see Connection to every node).

Example

For a platform of two nodes whose web addresses are 10.0.10.10 and 10.0.10.20, and whose SSL Routers listen on 10.0.10.11:443 and 10.0.10.21:443, run on the first node:

1
/usr/local/ipdiva/bin/clrcluster_joincluster.py --ssh-address 10.0.10.10 --gateway-address 10.0.10.11:443

then on the second node:

1
/usr/local/ipdiva/bin/clrcluster_joincluster.py --ssh-address 10.0.10.20 --gateway-address 10.0.10.21:443

The command registers the node in the default database and exchanges its SSH keys with the nodes already registered. When another node is already present, the shared secret and the files of the organisations are then retrieved from it automatically.

Information

The joining is not crossed: each node joins the platform by itself, with its own address. The command must therefore be run once on every node.

Address of the SSL Router

Always specify the --gateway-address option. Without it, the node is registered with its web address (HTTPS_ADDRESS in /etc/ipdiva.conf) rather than with that of its SSL Router: when the two addresses differ, the Edge Gateway instances created by the pairing cannot connect to the node. The command can be run again on a node already registered to correct its address: the node keeps its identifier.

Checking the nodes

The following command lists the nodes of the platform, with the date of their last heartbeat; each node must appear with the Active mark:

1
/usr/local/ipdiva/bin/clrcluster_listservers.py

If a node does not report any heartbeat, run on this node the following command, then interrupt it with Ctrl+C:

1
/usr/local/ipdiva/bin/clrcluster_heartbeat.py

Information

If the local firewall filters the SSH flows, the connections between the nodes may be blocked: the rules must authorise each node to reach the others.

Information

When all the nodes have been stopped, the first node to restart finds no other node with a recent heartbeat: the /var/log/ipdiva/clr_cluster.log file then contains the errors No peer with a recent heartbeat found and fetchallremotefile error. They have no effect: the following nodes synchronise their files from the first one.

Creation of the organisations

Organisations are created from the system console of one of the nodes, with an external database (PostgreSQL or Microsoft SQL Server), possibly reached through a tunnel between the Edge Gateways and the Mediation Controllers: Configure the organisation

Once an organisation is created, check on every node that its connection settings and its internal vault are present:

1
2
ls -l /etc/ipdiva/care/databases.d/
ls -l /etc/ipdiva/care/vault/

In case of synchronisation errors, the log of the exchanges between the nodes is available in /var/log/ipdiva/clr_cluster.log.

Next steps

  • Check the password of the system console


    The account of the system console is stored in the default database: it is common to all the nodes, and its password is changed once for the platform.

    Its initial password is the one set during the installation of the node whose system console was opened first after the connection to the default database.

  • Choose the language of the system console


    The system console is displayed in French by default, whatever the language of the browser. Choose the language in the Languages tile.

    Once for the platform: the setting is stored in the default database and applies to the system console of every node.

  • Configure the certification authorities


    Add the certification authority (CA) or authorities that do not belong to Systancia and that will be used for Edge Gateway and HTML5 Gateway certificates.

    On each node, from its own system console.

  • Configure the Web certificate


    Configure the web certificate used to connect to web interfaces.

    On each node, from its own system console.

  • Declare a DNS name


    Add a DNS name authorised to connect to web interfaces.

    On each node, from its own system console.

  • Choose the language of the administration console


    The administration console has its own language setting, for each organisation: it stays in French until another language is chosen in Configuration > Languages.

    Once for the platform, from the administration console of any node.

  • Declare the Edge Gateways


    Declare the Edge Gateways or HTML5 Gateways to be installed and generate a pairing token.

    Once for the platform, from the administration console of any node: the pairing creates one instance per node (see Connection to every node).

  • Create a logical site


    Create and configure a logical site that groups together Edge Gateways and HTML5 Gateways that can access local resources.

    Once for the platform, from the administration console of any node.

  • Install an Edge Gateway


    Install and configure an Edge Gateway for the multi-node platform.