If the RD gateway uses a self-signed certificate, then the certificate has to be installed as a trusted root CA certificate on the client machine.
- On the client machine, launch Remote Desktop Connection application
- Click "Show Options"
- click the "Advanced" tab, and select "Settings..."
- Select the "Use these RD Gateway server settings" option
In "Server Name" enter your RD Gateway server's external domain name, e.g. "rdgateway.deepnetsecurity.com".
Click "OK" to save the settings.