> For the complete documentation index, see [llms.txt](https://docs.devolutions.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.devolutions.net/gateway/guides/connect/kdc-proxy.md). Agents can also search and read this documentation through its [MCP server](https://docs.devolutions.net/~gitbook/mcp).

# Use the KDC proxy

Use Devolutions Gateway as a Kerberos KDC proxy for RDP, with short-lived tokens per session or long-lived tokens installed on Windows machines.

Kerberos needs the client to talk to a domain controller (the Key Distribution Center, KDC), which remote users usually cannot reach. Devolutions Gateway can act as a Kerberos KDC proxy ([MS-KKDCP](https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-kkdcp/d688ea3a-04b0-45ea-8226-82a74cb6289e)): the client sends its Kerberos requests over HTTPS to Devolutions Gateway, which forwards them to the domain controller. RDP sessions can then use Kerberos (Network Level Authentication) instead of NTLM, for example for members of the Active Directory ***Protected Users*** group, for whom NTLM is turned off.

The KDC proxy is configured in Devolutions Server or Devolutions Cloud. Long-lived tokens are available in Devolutions Server only.

## Pick the right option

<table><thead><tr><th width="220">CHOOSE</th><th>WHAT HAPPENS</th><th>USE IT WHEN</th></tr></thead><tbody><tr><td><strong>Short-lived tokens</strong> (recommended)</td><td>Each session opened through the gateway receives a KDC proxy address valid for that session only. Nothing is installed on the user's machine. Kerberos tickets themselves keep their usual lifetime, 10 hours by default in Active Directory.</td><td>RDP sessions opened from Remote Desktop Manager through Devolutions Gateway, and Devolutions web-based sessions.</td></tr><tr><td><strong>Long-lived tokens</strong></td><td>A KDC proxy address valid for one, three or six months, or one year, is installed in the Windows registry of a machine, for all Kerberos traffic of that realm.</td><td>Machines or tools that cannot receive a short-lived token from Devolutions Gateway.</td></tr></tbody></table>

## Before you start

* In Remote Desktop Manager for Windows, Microsoft RDP API hooking is on (it is on by default). See [Microsoft RDP API hooking](https://docs.devolutions.net/rdm/knowledge-base/knowledge-base-articles/microsoft-rdp-api-hooking).
* Devolutions Gateway can reach a domain controller of each realm on port 88 (TCP, or UDP for `udp://` addresses).
* Entries use the host name of the target, not its IP address: Kerberos works with names.

## Set up short-lived tokens

1. In the Devolutions Server web interface, go to ***Administration*** – ***Devolutions Gateway*** and edit the gateway.
2. In the ***KDC proxy*** section, click ***Add***.
3. Enter the ***KDC Server URL***, for example `tcp://ad.example.com:88`. It must start with `tcp://` or `udp://`.
4. Enter the ***Kerberos realm***, for example `ad.example.com`.
5. Select ***Set as default*** to use this KDC server for hosts that match no realm. The first KDC server added is the default.
6. Click ***Save***.
7. In the ***Advanced*** section of the gateway, clear ***Force using IP address for RDP connections***.
8. Save the gateway.

In Remote Desktop Manager, the same settings are under ***Administration*** – ***Privileged access*** – ***Devolutions Gateway*** – edit the gateway – ***KDC proxy***.

Each realm can have one KDC server: adding a second one shows "A KDC server already exists for this Kerberos realm."

When the user opens an RDP entry through this gateway, Remote Desktop Manager sets the KDC proxy of the session automatically.

### Which KDC server a session uses

* The realm that contains the host name wins, and the most specific realm wins when several match. For example, with realms `ad.example.com` and `corp.ad.example.com`, `srv.corp.ad.example.com` uses `corp.ad.example.com`.
* When the DNS domain of the host is above its realm (for example `srv.example.com` in realm `corp.example.com`), the closest realm under that domain is used.
* When no realm matches, the default KDC server is used.

{% hint style="info" %}
To keep Kerberos working when one domain controller is down, enter a DNS name that resolves to several domain controllers in ***KDC Server URL***, such as the Active Directory domain name (`tcp://ad.example.com:88`), rather than the name of one domain controller. With `tcp://`, Devolutions Gateway tries each resolved address until a domain controller answers.
{% endhint %}

## Set up long-lived tokens

1. In the Devolutions Server web interface, go to ***Administration*** – ***Devolutions Gateway***.
2. Open the menu of the gateway and select ***KDC proxy***.
3. Click ***Add***.
4. Enter the ***KDC Server URL*** and the ***Kerberos realm***, and choose ***Expires after***: one month, three months, six months or one year.
5. Click ***Add***.
6. Select the token and click ***Download KDC token configuration setup file***, then choose ***Registration file (\*.reg)*** or ***PowerShell file (\*.ps1)***. The file is named `Install Kdc Token {realm}`.
7. Run the file as an administrator on each machine that must use the KDC proxy.

***Copy KDC proxy URL to clipboard*** copies the KDC proxy address of the token, for tools configured by hand.

The setup files write the KDC proxy configuration under `HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System\Kerberos`: `KdcProxyServer_Enabled` set to `1`, and the KDC proxy address of the realm under `KdcProxy\ProxyServers`. To remove it, run the PowerShell file with `-Uninstall`, or delete the values with the Registry Editor.

{% hint style="warning" %}
A long-lived token lets anyone who has it send Kerberos requests to your domain controllers through Devolutions Gateway until it expires. Distribute the setup files only to the machines that need them, and revoke the token when it is no longer needed.
{% endhint %}

### Manage long-lived tokens

The ***KDC proxy tokens*** dialog lists each token with its ***Status*** (***Active***, ***Expired*** or ***Revoked***), ***KDC Server URL***, ***Kerberos realm*** and ***Token expiration date***.

* ***Revoke KDC proxy token*** makes the token unusable: Devolutions Server adds it to the revocation list that it publishes to the gateway.
* ***Delete KDC proxy token*** removes it from the list. Deleting an active or revoked token does not revoke it ("Deleting a token before it expires does not ensure its revocation status."): revoke it first.

In Remote Desktop Manager, long-lived tokens are in the ***KDC proxy tokens*** tab of the gateway details, under ***Administration*** – ***Privileged access*** – ***Devolutions Gateway***.

## Good to know

* A token issued for one realm is refused for another realm ("requested domain is not allowed").
* When a session goes through a specific Devolutions Agent (agent tunnel), the KDC server must use `tcp://`: `udp://` is refused.
* Devolutions Cloud has a ***KDC proxy*** tab with one KDC server URL and Kerberos realm per gateway, and no long-lived tokens.

## Next

* [Proxy-based credential injection](https://docs.devolutions.net/gateway/guides/connect/credential-injection.md)
* [Use a gateway in Remote Desktop Manager](https://docs.devolutions.net/gateway/guides/connect/remote-desktop-manager.md)


---

# 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.devolutions.net/gateway/guides/connect/kdc-proxy.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.
