> For the complete documentation index, see [llms.txt](https://docs.keeper.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keeper.io/keeperpam/privileged-access-manager/tunnels/rdp-proxy-in-tunnels.md).

# RDP proxy in tunnels

Native RDP clients, zero-credential access — all at once

### Overview

**KeeperRDP Proxy** lets you point your own RDP client (Windows `mstsc.exe`, Microsoft Remote Desktop on macOS, FreeRDP, and so on) at a Keeper tunnel and get a working desktop on the target without knowing the target's credentials. The Gateway acts as a transparent RDP proxy: your client connects to a local port, and the Gateway signs in to the real target with the credentials stored in your Keeper vault, then relays the session between the two.

Unlike a plain tunnel, which only forwards raw bytes and expects the client to authenticate to the target itself, a proxied tunnel keeps the real password inside Keeper. Whatever username and password your client sends is accepted and discarded; the vault credential is used on the upstream leg. Your RDP client behaves as it would on a direct connection, with the same desktop, keyboard, clipboard and display settings.

### Prerequisites

The proxy builds on a regular tunnel, so the RDP record must already be created and configured for connections and tunneling. This covers the PAM Machine record with the `rdp` protocol, its launch credentials, the PAM Configuration, and enabling tunneling on the record. All of that is explained on the parent page, [Tunnels](https://docs.keeper.io/keeperpam/privileged-access-manager/tunnels.md).

In addition, the proxy needs these versions:

| Component        | Minimum version | Notes                                                                                                                                                      |
| ---------------- | --------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Keeper Gateway   | **1.9.0.59**    | It provides KeeperRDP Proxy. Upgrading the Gateway is all that is needed on the server side.                                                               |
| Keeper Commander | **18.1.8**      | Adds the options used to target the new proxied RDP/SSH tunnels, for example `pam tunnel edit --keeper-proxy=on`. Only needed if you use Keeper Commander. |

The record must have **launch credentials** (a linked PAM User) or ephemeral (JIT) credentials configured. These are what the Gateway injects when it signs in to the target.

### Setting up the proxied tunnel

You can enable and start the proxied tunnel either from Keeper Commander or from the Keeper GUI clients.

#### Option 1: Keeper Commander

Enable the proxy on the record. Keeper Commander reads the record's connection protocol (`rdp`) and selects KeeperRDP Proxy automatically:

```
My Vault> pam tunnel edit --keeper-proxy=on <RDP_RECORD_UID>
```

If the record has no launch credentials (and no ephemeral JIT), the command stops and tells you to assign one first with `pam connection edit <RDP_RECORD_UID> --launch-user <PAM_USER_RECORD>`. To turn the proxy off again use `--keeper-proxy=off`; use `--keeper-proxy=default` to remove the setting from the record, which returns it to a plain tunnel.

Then start the tunnel as usual:

```
My Vault> pam tunnel start <RDP_RECORD_UID>

KeeperRDP Proxy ready
  Listening:  127.0.0.1:49152
  Connect:    mstsc /v:127.0.0.1:49152    (or wfreerdp /v:127.0.0.1:49152 /sec:tls /cert:ignore)
  Note:       when your RDP client prompts for credentials supply any value (or the per-session NLA token if NLA is enabled). The proxy substitutes the credentials configured in your Keeper vault before forwarding to the target.
```

Keeper Commander detects the proxy from the record's own setting, so adding `--proxy` to `pam tunnel start` is optional. The **Listening** line is the one that matters: the local port is `49152` when that port is free, and a different free port otherwise. Always copy the port from the output, or pin it yourself with `--port <PORT>` (the start fails if that port is taken).

If the record lets users choose their own credentials (**Allow users to select credentials from their vault**), you can use a different PAM User record for a single session:

```
My Vault> pam tunnel start <RDP_RECORD_UID> --credential <PAM_USER_RECORD_UID_OR_TITLE>
```

[Connect with an RDP client](#connecting-with-an-rdp-client)

When you are finished, stop the tunnel:

```
My Vault> pam tunnel stop --all
```

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2F9lbvCag3vT0gW7SpcZCO%2Frdp_proxy_tunnel_start.jpg?alt=media&amp;token=b75f5edc-b1b7-4fb8-a1d8-251a7c5296a4" alt=""><figcaption><p>Keeper Commander shell starting RDP proxied tunnel</p></figcaption></figure>

#### Option 2: Web Vault or Keeper Desktop App

Both the Web Vault and the Desktop App can enable the proxy on a record, but a tunnel opens a port on your own machine, so **starting** it is done in the **Keeper Desktop App**.

* **Enable the proxy.** Open the RDP record, choose **Edit**, go to **PAM Settings**, and in the **Tunnel** section make sure **Enable Tunnel** is ticked. Under **RDP Proxy**, tick **Enable RDP Proxy** and save the record. The RDP Proxy section is shown only for records whose connection protocol is RDP.
*

```
<figure><img src="../../.gitbook/assets/rdp_proxy_tunnel_settings.jpg" alt=""><figcaption><p><strong>Enable the proxy in web vault.</strong> <strong>Edit</strong> > <strong>PAM Settings</strong> > <strong>Tunnel</strong> > <strong>Enable Tunnel</strong> and <strong>Enable RDP Proxy</strong>.</p></figcaption></figure>
```

* **Start the tunnel.** In the Desktop App, open the record (or find it in the tunnels list) and click **Start Tunnel**. Depending on the record, the button either starts immediately with the record's launch credential, or opens a menu to pick one of your own credentials (when users may select credentials from their vault). The tunnel row shows the local port to connect to; use it in your RDP client.
*

```
<figure><img src="../../.gitbook/assets/rdp_proxy_tunnel_start_gui.jpg" alt=""><figcaption><p><strong>Starting the tunnel</strong> in the Desktop App</p></figcaption></figure>
```

If the Gateway is older than the required version, the Desktop App refuses to start the tunnel and shows "RDP Proxy requires gateway version ... or higher. Please update your gateway."

### Connecting with an RDP client

With the tunnel running, point your RDP client at the local address and port.

**Windows (`mstsc.exe`).** Enter `127.0.0.1:49152` as the computer, or run:

```
C:\> mstsc /v:127.0.0.1:49152
```

Remember to use the port shown by the tunnel. If the client prompts for credentials, type any username and password; the proxy ignores them and signs in with the vault credential. The proxy presents its own certificate on the local port, so `mstsc` shows a certificate warning. This is expected for a loopback connection and the warning refers to the local proxy, not the target. Accept it to continue.

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FjjdFR30Ca8AOn8LuaG0w%2Frdp_session_start.jpg?alt=media&amp;token=37a5ea81-a256-4664-a734-76a7524778c0" alt=""><figcaption><p>Starting RDP session and accepting the certificate</p></figcaption></figure>

<figure><img src="https://762006384-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MJXOXEifAmpyvNVL1to%2Fuploads%2FPqJUCm3KyANX5QcNMNS2%2Frdp_session.jpg?alt=media&amp;token=9b62a685-017a-404f-9e66-0c48ebd0c975" alt=""><figcaption><p>RDP sesion running in inside proxied tunnel</p></figcaption></figure>

**FreeRDP.** FreeRDP clients take the credentials and certificate handling on the command line:

```
C:\> wfreerdp /v:127.0.0.1:49152 /sec:tls /u:anyuser /p:anypassword /cert:ignore
$ xfreerdp /v:127.0.0.1:49152 /sec:tls /u:anyuser /p:anypassword /cert:ignore
```

**macOS and other clients.** Add a PC with the PC name `127.0.0.1:49152` and any username and password. Remember to use the port shown by the tunnel.

### Troubleshooting

| Symptom                                                                                 | Likely cause and fix                                                                                                                                                      |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `No Launch Credentials assigned to record`                                              | The record has no linked PAM User. Add one with `pam connection edit <RDP_RECORD_UID> --launch-user <PAM_USER_RECORD>` and run `pam tunnel edit --keeper-proxy=on` again. |
| `--keeper-proxy has no effect for record ...`                                           | The record's connection protocol is not `ssh`, `rdp` or a database protocol. Set the protocol on the record first.                                                        |
| `--credential requires the "Allow users to select credentials from their vault" option` | Enable that option on the record, then retry.                                                                                                                             |
| `RDP Proxy requires gateway version ... or higher` (Desktop App)                        | Update the Gateway, see [Prerequisites](#prerequisites).                                                                                                                  |
| The RDP client cannot connect to `127.0.0.1:49152`                                      | The tunnel is not running, or it picked a different port. Check the `Listening` line of `pam tunnel start`, the port shown in the Desktop App, or run `pam tunnel list`.  |
| Certificate warning on every connect                                                    | Expected, the local proxy presents its own certificate. Accept it, or use `/cert:ignore` with FreeRDP.                                                                    |

### KeeperRDP Proxy: Supported Protocols

The KeeperRDP Proxy sits between your RDP client and the target Windows host. It handles two separate connections, each with its own protocol:

* **Client to proxy**: your RDP client (Windows App, mstsc, FreeRDP) connecting through the tunnel.
* **Proxy to target**: the connection the proxy opens to the Windows host. This is the record's **Security** setting.

#### Proxy to target (record Security setting)

| Security setting         | Protocol used with the target                               | Status       |
| ------------------------ | ----------------------------------------------------------- | ------------ |
| `any` (default)          | TLS, NLA, or NLA extended, whichever the target accepts     | Supported    |
| `tls`                    | TLS                                                         | Supported    |
| `nla`                    | NLA (CredSSP)                                               | Supported    |
| `nla-ext`                | NLA extended (CredSSP with Early User Authorization Result) | Supported    |
| `vmconnect`              | Hyper-V virtual machine console                             | Experimental |
| `rdp` ("RDP Encryption") | Standard RDP Security (legacy RC4 encryption)               | Not yet      |

{% hint style="warning" %}
**Targets that only allow Standard RDP Security are not supported.** With `any` or `rdp`, the connection is refused immediately, and the Gateway log states that the target only allows Standard RDP Security. Use a regular (non-proxy) connection for these targets, or set the target's RDP security layer to **Negotiate** or **SSL**.
{% endhint %}

{% hint style="info" %}
`vmconnect` has not been validated against real Hyper-V hosts and may not always work.
{% endhint %}

#### Client to proxy

<table><thead><tr><th>Protocol</th><th width="379">Status</th></tr></thead><tbody><tr><td>TLS</td><td>Supported</td></tr><tr><td>NLA (CredSSP)</td><td>Supported</td></tr><tr><td>NLA extended (CredSSP with Early User Authorization Result)</td><td>Supported</td></tr><tr><td>Standard RDP Security (RC4)</td><td>Not yet</td></tr><tr><td>RDSTLS</td><td>Not yet</td></tr></tbody></table>

#### Authentication

| Method   | Status    |
| -------- | --------- |
| NTLM     | Supported |
| Kerberos | Not yet   |

#### When the proxy rejects a connection

| Situation                                | What the client sees                                                             |
| ---------------------------------------- | -------------------------------------------------------------------------------- |
| Target only allows Standard RDP Security | Connection refused with `SSL_NOT_ALLOWED_BY_SERVER`                              |
| Target rejects the stored credentials    | NLA extended clients get "access denied"; other clients see the connection close |

### See also

* `pam tunnel edit --help` and `pam tunnel start --help` in [Keeper Commander](https://docs.keeper.io/keeperpam/commander-cli/command-reference/keeperpam-commands.md#sub-command-tunnel) for the full option list.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keeper.io/keeperpam/privileged-access-manager/tunnels/rdp-proxy-in-tunnels.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
