TRINITY logoTRINITYVDI

TRINITY VDI / Documentation / 10. VDI gateways

10. VDI gateways

Install two TRINITY VDI gateways in the DMZ with a virtual IP: LDAPS sign-in, authenticator or passkey, pairing codes and a failover test.

Download the packages
Documentation pages

Two nodes in the DMZ with one VIP; they pair with the connection servers. Copy TRINITY-VDI-Gateway-1.2.1-Linux.tar.gz with the checksum list to gw01 and gw02 (2.5), and from trinity01 the certificate:

cd ~/certs && for ip in 172.16.10.21 172.16.10.22; do scp vdi.crt vdi.key corp-root.crt $ip: ; done

10.1 Trust, LDAPS check and firewall (both nodes)

sudo install -m 644 ~/corp-root.crt /usr/local/share/ca-certificates/corp-root.crt && sudo update-ca-certificates
for dc in dc1 dc2; do openssl s_client -connect $dc.corp.example.com:636 -verify_return_error </dev/null 2>/dev/null | grep 'Verify return code'; done
sudo ufw allow 443/tcp && sudo ufw allow 443/udp && sudo ufw allow 80/tcp
sudo ufw allow from 172.16.10.22 proto vrrp      # on gw01
sudo ufw allow from 172.16.10.21 proto vrrp      # on gw02

Both domain controllers must answer Verify return code: 0 (ok). The DMZ firewall must allow the gateways to the connection servers VIP (TCP 443) and to the DCs (TCP 636).

10.2 Cluster and pairing codes in the portal

  1. As L4: Trinity VDI > VDI portal settings > Gateway clusters > New gateway cluster: name vdigw, VIP 172.16.10.23/24, public host name vdi.example.com, Save.
  2. On the cluster card Pair node: name gw01, allowed address 172.16.10.21, Create code, copy it (shown once, valid 30 minutes).
  3. Pair node again for gw02 / 172.16.10.22.

10.3 First node (gw01, priority 150)

cd ~ && tar xzf TRINITY-VDI-Gateway-1.2.1-Linux.tar.gz
IF=$(ip -o -4 route show to default | awk '{print $5}' | head -n1)
read -rp 'Pairing code for gw01: ' CODE
sudo ./vdigw/install-trinity-vdigw.sh --portal https://cs.corp.example.com --code "$CODE" --name gw01 \
  --ldap dc1.corp.example.com,dc2.corp.example.com --domain corp.example.com --netbios CORP \
  --cert ~/vdi.crt --key ~/vdi.key --cluster --vip 172.16.10.23/24 --interface $IF --peer 172.16.10.22 --priority 150
sudo install -m 600 -o $USER /etc/trinity-vdigw/vrrp.secret ~/vrrp.secret
scp ~/vrrp.secret 172.16.10.22: && rm ~/vrrp.secret ~/vdi.key
sudo trinity-vdigw status

10.4 Second node (gw02, priority 100)

cd ~ && tar xzf TRINITY-VDI-Gateway-1.2.1-Linux.tar.gz
IF=$(ip -o -4 route show to default | awk '{print $5}' | head -n1)
read -rp 'Pairing code for gw02: ' CODE
sudo ./vdigw/install-trinity-vdigw.sh --portal https://cs.corp.example.com --code "$CODE" --name gw02 \
  --ldap dc1.corp.example.com,dc2.corp.example.com --domain corp.example.com --netbios CORP \
  --cert ~/vdi.crt --key ~/vdi.key --cluster --vip 172.16.10.23/24 --interface $IF --peer 172.16.10.21 --priority 100 \
  --vrrp-secret-file ~/vrrp.secret && rm ~/vrrp.secret ~/vdi.key
sudo trinity-vdigw status

10.5 Check and failover test

curl -s -o /dev/null -w '%{http_code}\n' https://vdi.example.com/healthz      # 200 (the active node, after chapter 11)
curl -sk -o /dev/null -w '%{http_code}\n' https://172.16.10.22/healthz         # 503 (the standby)
sudo trinity-vdigw failover 30                                                 # on the active node: users stay signed in

Names, addresses and accounts in the examples (corp.example.com, 10.0.x.x, CORP\…) are examples: use your own. TRINITY 1.2.1, December 2026.