Install the gateway and guacd
The gateway runs inside your network. It is an Internet Information Services (IIS) site that connects the portal to Netwrix Privilege Secure for Access Management (Privilege Secure) and to the Apache Guacamole daemon (guacd). guacd runs as a Docker container in Windows Subsystem for Linux (WSL) on the same server.
Complete the steps in order. Run Configure-Gateway.ps1 only after guacd is running.
Before you begin
- Check the server against Remote Access Gateway requirements, including nested virtualization if the server is a virtual machine.
- Get the Remote Access Gateway package from the Netwrix Customer Portal. It is a separate download from the main Privilege Secure package. The zip file is named
privilegesecure-accessmanagement-rag-<version>.zip, for exampleprivilegesecure-accessmanagement-rag-26.07.3.zip. It containsNPS.RagGateway.exeandNPS.RagPortal.exe. - Sign in to the gateway server as a local administrator and run PowerShell as an administrator.
The examples use these placeholders. Replace them with your values.
| Placeholder | Meaning |
|---|---|
<nps-server> | Fully qualified domain name (FQDN) of the Privilege Secure application server |
<guacd-host> | Address of the WSL instance that runs guacd, as the Windows host sees it |
Run the gateway installer
- Copy
NPS.RagGateway.exeto the gateway server. - Right-click the installer and select Run as administrator. The setup wizard opens.
- Select I agree to the license terms and conditions and click Install.
- When the page shows "Installation Successfully Completed", click Close.
The installer creates the IIS site NPS Gateway Web Service, which listens on HTTPS port 6550. The gateway isn't a Windows service, so it doesn't appear in services.msc. To confirm the binding, run:
Get-WebBinding -Name "NPS Gateway Web Service"
The output lists an https binding on *:6550.
Enable systemd in WSL
-
Run Windows Update on the server before you install WSL. If the server has no WSL distribution, run
wsl --installand restart the server if prompted. WSL installs the default Ubuntu distribution. -
Open the Ubuntu distribution and edit
/etc/wsl.confas root. Add these lines:[boot]systemd=true -
In PowerShell, stop WSL so the change takes effect:
wsl --shutdown -
Open the Ubuntu distribution again.
Install Docker and start guacd
The gateway package includes install-docker.sh. It installs Docker, pulls guacamole/guacd:1.6.0, and starts the guacd container.
-
In the Ubuntu distribution, run the script as root:
sudo bash "/mnt/c/Program Files/Stealthbits/PAM/NPS.RagGateway/guacd/install-docker.sh" -
List the running containers:
sudo docker psThe output lists a container named
guacdthat publishes port 4822. -
Find the address of the WSL instance. This is the
<guacd-host>value for the next section.wsl hostname -IUse the first address in the output.
-
In PowerShell, confirm that guacd listens on port 4822:
Test-NetConnection <guacd-host> -Port 4822TcpTestSucceededmust beTruebefore you continue.
On some Ubuntu releases, install-docker.sh installs a Docker engine that can't start containers, and docker run fails with the error cgroups: cgroup mountpoint does not exist. If you see this error, contact Netwrix Support.
Configure the gateway
Run the configuration script after guacd is reachable. The script generates the guacd certificate if one doesn't exist, writes the gateway settings, and writes guacd.conf, which turns on TLS in guacd.
If guacd isn't reachable on port 4822, Configure-Gateway.ps1 prints one error and exits before it applies your values to appsettings.json or writes guacd.conf. The gateway then runs on its default settings and sessions fail. Confirm the Test-NetConnection check passes before you run the script.
-
In PowerShell, go to the gateway installation folder:
cd "C:\Program Files\Stealthbits\PAM\NPS.RagGateway" -
Run the script:
.\Configure-Gateway.ps1 -NPSGuacdHost <guacd-host> -NPSHost https://<nps-server>:6500If
C:\ProgramData\Stealthbits\PAM\RagGateway\guacd.thumbprintdoesn't exist, the script createsguacd.key,guacd.crt,guacd.pfx, andguacd.thumbprint. It then connects to Privilege Secure, checks that port 4822 is reachable, and writesappsettings.jsonandguacd.confin the same folder. -
In the Ubuntu distribution, restart guacd so it loads the new certificate:
sudo docker restart guacdsudo docker logs guacdThe log includes the line "Communication will require SSL/TLS".
In 26.07.3 the gateway installs with validation of the certificate on https://<nps-server>:6500 turned off, so it connects even when it doesn't trust the certificate. For production, turn validation on and ensure the gateway server trusts the certificate. See Skip certificate validation for Privilege Secure.
The script stores <guacd-host> in the Guacd.Hostname setting. In the default NAT networking mode, WSL 2 gives the distribution its own virtual network address, and Microsoft doesn't document that this address stays the same after WSL or the server restarts. After a restart, run wsl hostname -I again. If the address differs from Guacd.Hostname, run Configure-Gateway.ps1 again with the new address. The script reuses the existing guacd certificate.
Start WSL automatically
guacd stops when WSL stops, and sessions fail until WSL runs again. The gateway package includes Setup-WslTask.ps1 to register a scheduled task that starts WSL when the server starts. The script registers the scheduled task "Start Gaucd on WSL". The task runs wsl.exe 60 seconds after startup with the highest privileges, as the account that you enter, and has no time limit.
-
Sign in as the Windows user who installed WSL. Each user has a separate WSL environment.
-
Run the script from the gateway installation folder:
.\guacd\Setup-WslTask.ps1 -
When the credential dialog opens, enter the credentials of the account that runs the task. The script has no unattended mode.
Verify the installation
The gateway writes PAM-RagGateway*.log to C:\ProgramData\Stealthbits\PAM\Log. The file stays empty until the gateway receives its first request.
Install the portal next. See Install the portal. To fix problems, see Troubleshoot the Remote Access Gateway.