> Source: https://docs.cyberelements.io/bastion/4.7/sv/Installation/EdgeGateway/Prerequisites/

# Prerequisites of the Edge Gateways

The prerequisites of an Edge Gateway depend on its format (Debian or virtual appliance, Windows) and, for its flows towards the Mediation Controller, on the architecture of the platform.

## Machine

**Debian or virtual appliance**

> Both physical and virtual machines can be used to install CyberElements Bastion.
> The product does not perform any virtualisation, so the embedded virtualisation option does not need to be enabled for virtual machines.
>
> **OS**
>
> CyberElements Bastion 4.7 runs on 64-bit Debian 13 (Trixie) machines.
> It is recommended to use machines without a graphical interface and to limit the installed components to the SSH server: in the software selection screen of the Debian installer, keep only `SSH server` checked (`standard system utilities` is checked by default).
>
> > **Information**
> >
> > Version 4.7 no longer runs on Debian 12 (Bookworm). A platform installed in version 4.6 moves to Debian 13 during its [version upgrade](https://docs.cyberelements.io/bastion/4.7/sv/Upgrade/Introduction/).
>
> > **Recommendation**
> >
> > The security hardening guide details the minimal Debian installation, the follow-up of the Debian version and of its security maintenance, and the removal of the packages installed by default: see [R1](https://docs.cyberelements.io/bastion/4.7/sv/Security/SystemHardening/SystemInstallation/#r1), [R2](https://docs.cyberelements.io/bastion/4.7/sv/Security/SystemHardening/SystemInstallation/#r2) and [R4](https://docs.cyberelements.io/bastion/4.7/sv/Security/SystemHardening/SystemInstallation/#r4).
>
> **CPU**
>
> A CPU with 4 cores will cover most use cases for the product.
>
> **RAM**
>
> > **Attention**
> >
> > The RAM values given below are indicative only, as there are many variables that can affect RAM consumption (product features used or elements installed in parallel with the product on the machine).
>
> RAM consumption depends on the number of simultaneous sessions as well as the types of applications being used.
>
> Typical values are as follows:
>
> - Between 1 and 5 simultaneous users: 2 GB of RAM minimum, 4 GB recommended.
> - Between 5 and 20 simultaneous users: 4 GB of RAM minimum.
> - For 20 or more simultaneous users: 8 GB of RAM.
>
> Note that an agentless RDP or VNC application can consume up to 400 MB per application launched.
> When these types of applications are used extensively, it is recommended to monitor RAM usage in order to adjust its size accordingly.
>
> **Disk**
>
> This server will experience increased volume in the following directories:
>
> - `/var/log/`: directory containing the various system logs.
> - `/var/lib/ipdiva/carerecord/recording/`: directory containing archives currently being recorded; this is therefore a temporary storage directory.
> - `/var/lib/ipdiva/carerecord/archives/`: default directory containing the product's graphic archives.
> - `/var/ipdiva/care/sshrecord/`: default directory containing the product's non-graphic (SSH) archives.
>
> Isolating the different directories in different partitions is not mandatory but recommended. You can follow these instructions:
>
> | Mount point | Options | Minimum size (GB) |
> |---|---|---|
> | `/boot` | nosuid,nodev,noexec | 1 |
> | `/opt` | nosuid,nodev | 2 |
> | `/tmp` | nosuid,nodev | 4 |
> | `/srv` | nosuid,nodev | 1 |
> | `/home` | nosuid,nodev,noexec | 6 |
> | `/usr` | nodev | 6 |
> | `/var` | nosuid,nodev | 5 |
> | `/var/log` | nosuid,nodev,noexec | 5 |
> | `/var/tmp` | nosuid,nodev,noexec | 2 |
> | `swap` | No option | Depending on RAM (half less) |
> | `/` | No option | 2 GB or more depending on the available disk space |
>
> > **Example**
> >
> > For a server with 4 GB of RAM (which requires 2 GB of `swap`), the disk space required with the previous partitioning is a minimum of 36 GB.
>
> However, it is strongly recommended to allocate more disk space for temporary or long-term graphic archives with the `/var` mount point unless [the archives are outsourced](https://docs.cyberelements.io/bastion/4.7/sv/Usage/Configuration/EdgeGateway/OutsourcingArchiveStorage/).
>
> > **Recommendation**
> >
> > The security hardening guide proposes a reference partitioning with its mount options, which differs on some points from the table above: see [R3](https://docs.cyberelements.io/bastion/4.7/sv/Security/SystemHardening/SystemInstallation/#r3).

**Windows**

> The Windows Edge Gateway is installed with administrator rights. Its compatibility with the versions of Microsoft Windows is given in the [compatibility matrix](https://docs.cyberelements.io/bastion/4.7/sv/CompatibilityMatrix/).

## Network

> **Recommendation**
>
> The security hardening guide details the local firewall rules to be applied to these flows: see [Local firewall](https://docs.cyberelements.io/bastion/4.7/sv/Security/LocalFirewall/).

Edge Gateway servers are usually placed in the LAN, in VLANs that allow them to communicate with target resources.

> **VMware virtual machine**
>
> The network of a Debian Edge Gateway is configured as a bridge (`br0`). In a VMware virtual machine, the VPN in bridge mode only works if the port group of the network interface of the virtual machine accepts the promiscuous mode (setting of the hypervisor).

> **Information**
>
> The security hardening guide states the recommended network placement. The Mediation Controller can be exposed directly on the Internet through a public IP address; CyberElements nevertheless recommends installing it in a DMZ, public or with private addressing (in the latter case the necessary ports are published through NAT rules configured on the perimeter firewall or router). The Edge Gateway requires no direct Internet access in operation and no inbound access from the Internet; a limited access may be authorised during maintenance operations.

To better identify the different machine addresses, they will be referred to as follows in the documentation:

| IP address name | Signification |
|---|---|
| `IP_GW` | IP address of the Edge Gateway server. |

### Flows of the Edge Gateway

These flows do not depend on the architecture of the platform.

**LAN to WAN flow**

> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` | Debian repositories | TCP 80 | Required for installing CyberElements Bastion dependencies and keeping the system up to date. The documentation and virtual appliances use `ftp.fr.debian.org` and `security.debian.org`. |
> | `IP_GW` | DNS server | UDP 53 | Required for DNS resolution. Optional if a DNS server is available on the LAN or DMZ. |
> | `IP_GW` | NTP time server | UDP 123 | Optional if the server needs to synchronise its clock with a server in the LAN or DMZ. By default, the Debian pools are used: `0.debian.pool.ntp.org`, `1.debian.pool.ntp.org`, `2.debian.pool.ntp.org` and `3.debian.pool.ntp.org`. |
> | `IP_GW` | SMS provider | TCP 443 | (Optional) Connection to the APIs of SMS providers supported by CyberElements Bastion. |

**LAN to LAN flow**

> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` | DNS Server | UDP 53 | Required for DNS resolution. Optional if a DNS server is used to the WAN or DMZ. |
> | `IP_GW` | LDAP or AD Servers | TCP 389 or 636 | CyberElements Bastion connection to an LDAP or AD server. |
> | `IP_GW` | AD Servers | TCP 139 and 445 | AD account password rotation, used only if rotation via LDAPS is not possible. |
> | `IP_GW` | RDP Servers | TCP/UDP 3389 (if using standard port) | Connection from CyberElements Bastion to RDP servers. |
> | `IP_GW` | SSH servers | TCP 22 (if using the standard port) | Connection from CyberElements Bastion to SSH servers. |
> | `IP_GW` | VNC servers | TCP 5900 (if using the standard port) | Connection from CyberElements Bastion to VNC servers. |
> | `IP_GW` | Web servers | TCP 80 or 443 (if using the standard port) | Connection from CyberElements Bastion to web servers. |
> | `IP_GW` | Citrix Storefront servers | TCP 443 (if using the standard port) | Connection from CyberElements Bastion to Citrix Storefront servers. |
> | `IP_GW` | Citrix application servers | TCP 1494 | Connection from CyberElements Bastion to Citrix application servers (launching an application or desktop with the ICA client). |
> | `IP_GW` | File servers | TCP 139 and 445 | Connection from CyberElements Bastion to file servers. |
> | `IP_GW` | Database server | TCP 1433, 5432, or any other custom port | Required if you want to use an external database located on the LAN (for example, to transfer the Vault database). |
> | `IP_GW` | RDP servers | TCP 139 and 445 | Deployment of the recording agent via the administration console. |
> | Client workstation | `IP_GW` | TCP [port defined by the administrator] | Direct SSH access connection. |
> | Client workstation | `IP_GW` | TCP 3389 | Direct RDP access connection. |
> | RDP servers | `IP_GW` | TCP 8443 | Connection between the recording agent and the Edge Gateway to upload the user session recording. |
> | Administrator workstation | `IP_GW` | TCP 22 | SSH connection to the Edge Gateway server. |

### Flows towards the Mediation Controller

**Standalone**

> **WAN to DMZ flow**
>
> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` | `IP_MC_WEB` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connection to the Edge Gateway pairing system. |
> | `IP_GW` | `IP_MC_SSL` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connect to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |
>
> **LAN to DMZ flow**
>
> | Source(s) | Destination(s) | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` | `IP_MC_WEB` | TCP 443 (if using the standard port) | Connection to the Edge Gateway pairing system. |
> | `IP_GW` | `IP_MC_SSL` | TCP 443 (if using the standard port) | Connection to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |

**Cluster**

> **WAN to DMZ flow**
>
> | Source | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` | `VIP_MC_WEB` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connection to the Edge Gateway pairing system. |
> | `IP_GW` | `VIP_MC_SSL` | TCP 443 (if using the standard port) | When the Edge Gateway is located on a remote network. Connection to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |
>
> **LAN to DMZ flow**
>
> | Source(s) | Destination | Destination port | Comments |
> |---|---|---|---|
> | `IP_GW` | `VIP_MC_WEB` `RIP_MC_WEB_MASTER` `RIP_MC_WEB_SLAVE` | TCP 443 (if using the standard port) | Connection to the Edge Gateway pairing system. |
> | `IP_GW` | `VIP_MC_SSL` `RIP_MC_SSL_MASTER` `RIP_MC_SSL_SLAVE` | TCP 443 (if using the standard port) | Connection to the SSL Router to establish a TLSv1.3 tunnel and route product communications through it. |

**Multi-node**

> The flows of a Standalone platform apply towards each node to which an instance of the Edge Gateway connects (see [Multi-node Edge Gateways](https://docs.cyberelements.io/bastion/4.7/sv/Installation/MultiNode/InstallEdgeGateway/)).

> **Information**
>
> A firewall or a router placed upstream and performing deep packet inspection (DPI) or protection against distributed denial-of-service (DDoS) attacks strengthens overall security. That device must not, however, alter the SSL/TLS packets used by the product.

> **Information**
>
> The flows towards the Debian repositories belong to **maintenance** operations, and are distinguished from the flows required in operation. Network devices generally filter on IP addresses rather than on domain names; since the addresses of the repositories and of the external services may change over time, a fresh DNS resolution should be performed regularly so as to check that the filtering rules remain consistent with the addresses actually used.

## Certificates

CyberElements Bastion uses TLS encryption for internal communications and HTTPS to secure web access, requiring the use of various x509 certificates. The information below summarises the different certificates required, their purpose, and the minimum settings.

> **Recommendation**
>
> The security hardening guide details the protection of the Edge Gateway certificate and private key, and the recommended TLS configuration: see [Edge Gateway certificate and private key](https://docs.cyberelements.io/bastion/4.7/sv/Security/GatewayCertificates/) and [TLS 1.2 and TLS 1.3](https://docs.cyberelements.io/bastion/4.7/sv/Security/Tls/).

> **Certificate security constraint**
>
> Regardless of the certificate used, ensure that it complies with [OpenSSL security level 2](https://docs.openssl.org/3.0/man3/SSL_CTX_set_security_level/#default-callback-behaviour), which can be summarised as follows:
>
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits.
> - The certificate signature must not be MD5 or SHA-1 (SHA-512 is preferred).

This server uses two different certificates:

- One certificate for authenticating the Edge Gateway component with the SSL Router.
- A certificate for the recording service so that recording agents can connect to it.

> **Information**
>
> An Edge Gateway server can have multiple Edge Gateway instances, requiring as many certificates as there are Edge Gateway instances (except in the specific case of cluster architecture).
>
> However, an Edge Gateway server has only one recording service, so only one certificate per machine will be required.

**Edge Gateway Certificate**

> The Edge Gateway certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The `Common Name` attribute must have a value that identifies the logical Edge Gateway. This name takes the following form `<GW_NAME>@<ORGANIZATION_NAME>`, where `<GW_NAME>` corresponds to the name of the Edge Gateway (as entered in the administration console) and `<ORGANIZATION_NAME>` corresponds to the name of the organisation to which the Edge Gateway will connect.
> - The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
> - The `Extended Key Usage` attribute must have the value `clientAuth`.
>
> Accepted certificate format: `P12`.

**Recording service certificate**

> The recording service certificate must comply with the following constraints for its attributes:
>
> - The certificate's validity period must not exceed 1095 days (3 years).
> - The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
> - The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
> - The value of the `Common Name` attribute must be the FQDN name or at least the name of the Edge Gateway machine.
> - The `Key Usage` attribute must have the values `critical`, `digitalSignature` and `keyEncipherment`.
> - The `Extended Key Usage` attribute must have the value `serverAuth`.
>
> Accepted certificate format: `P12`.

The Windows Edge Gateway has no recording service: it does not use the recording service certificate.

### Direct recording agent

For direct access operation, the direct recording agent uses a certificate to authenticate itself with the recording service of an Edge Gateway.

The certificate must comply with the following constraints for its attributes:

- The certificate's validity period must not exceed 1095 days (3 years).
- The hash function used for the signature must be part of the SHA-2 family; we recommend SHA-512.
- The certificate and the certificates of its certification authorities must have a private key of at least 2048 bits with RSA, DSA, and DH encryption; for elliptic curve keys (ECC), they must be at least 224 bits. We recommend a size of 4096 bits for RSA and an ECDSA `secp384r1` curve size of 384 bits.
- The `Common Name` attribute must have a value that is the short name, FQDN, or any other name that will uniquely identify the machine. This name is used to identify and track actions performed on the machine.
- The `Key Usage` attribute must have the values `critical` and `digitalSignature`.
- The `Extended Key Usage` attribute must have the value `clientAuth`.

Accepted certificate format: `P12`.
