Kerberos and Protected Users
Launching an RDP session with Kerberos and users under the Protected Users group
RDP with Kerberos (Protected Users)
Instructions for connecting to Windows machines over RDP with accounts that must use Kerberos, such as members of the Active Directory Protected Users group or accounts in domains where NTLM is disabled.
Overview
Members of the Protected Users group cannot authenticate with NTLM. When the Keeper Gateway connects to a Windows machine over RDP with Network Level Authentication (NLA), it uses Kerberos if it can and falls back to NTLM if it cannot. For a Protected Users account the fallback is rejected, and the session ends with:
Access denied by server (account locked/disabled?)
To use Kerberos:
The PAM Machine record must identify the target by its fully qualified host name. This applies to every Gateway platform and is the most common cause of failure.
The Keeper Gateway must be able to locate a domain controller (KDC) for the user's domain.
Windows Gateway: Windows locates the domain controller itself. No configuration is needed.
Linux and Docker Gateway: the Gateway locates the domain controller through DNS, as described below.
Prerequisites
Keeper Gateway 1.9.0 or later.
The Gateway can reach your domain controllers on TCP and UDP port 88 (Kerberos).
The target Windows machine is joined to the Active Directory domain.
On a Windows Gateway, the Gateway host can locate your domain controllers, which is the case when it is joined to the domain or uses your Active Directory DNS servers.
Configure the PAM Machine and PAM User records
PAM Machine: Hostname or IP Address
The machine's fully qualified host name: its computer name followed by the Active Directory DNS domain. An IP address (10.0.1.20) or the domain name alone (corp.example.com) cannot be used with Kerberos.
server01.corp.example.com
PAM User: Login
The user principal name (UPN), or the user name with the AD DNS domain in the Domain field. A NetBIOS domain name (for example CORP) cannot be used.
jsmith@corp.example.com
PAM Machine: Security Mode
Any or NLA.
Any
Finding the machine's fully qualified host name
On the target machine, open Windows PowerShell and run:
The output, for example EC2AMAZ-A0GBNDM.corp.example.com, is the value for the Hostname or IP Address field. From a command prompt, hostname returns the computer name without the domain.
Confirm that the Gateway host resolves the name to the machine:
Windows Gateway
A Keeper Gateway installed as a Windows service uses Windows' own Kerberos support. It does not need a Kerberos configuration file or any DNS changes beyond what the Gateway host already uses to find your domain controllers. Set the PAM Machine and PAM User records as described above, and connect.
Linux and Docker Gateway: how the Gateway locates the domain controller
The Gateway finds a domain controller by looking up the domain's Kerberos DNS records (_kerberos._tcp.<your AD domain>). Only DNS servers that serve your Active Directory zone can answer this lookup.
The Docker container uses the same DNS servers as the host it runs on. Check the host first:
The lookup returns one or more domain controllers: no change is needed. This is typical when the host's DNS servers are your Active Directory DNS servers.
The lookup returns nothing: the host uses DNS servers that do not serve your Active Directory zone, for example a cloud VPC resolver or public DNS. Use one of the options below.
Configure your existing DNS to forward queries for your Active Directory domain to your domain controllers, for example with a conditional forwarder on your DNS servers or an Amazon Route 53 Resolver forwarding rule. The Gateway needs no changes, and every other system on the network can resolve the domain as well.
Point the Gateway container at your Active Directory DNS servers, usually your domain controllers:
Apply the change by recreating the container. docker restart does not apply changes to the compose file.
With docker run, use --dns 10.0.1.10 --dns 10.0.1.11.
If you cannot change the container's DNS servers, tell Kerberos where your domain controllers are with a configuration snippet. Create krb5-realm.conf:
The realm is your Active Directory DNS domain in upper case. You can list domain controllers by IP address.
Mount the file into /etc/krb5.conf.d/. Do not replace /etc/krb5.conf.
Finding your domain controllers
On any machine joined to the domain, run:
The Address: line shows a domain controller. ipconfig /all on a domain-joined machine lists your Active Directory DNS servers under DNS Servers.
Verify from the Gateway container
Enter the user's password when prompted. No output means the Gateway reached a domain controller and obtained a Kerberos ticket. Cannot find KDC for realm means the DNS step above is not complete.
Troubleshooting
Access denied by server (account locked/disabled?) for a Protected Users account, while other accounts connect
Kerberos could not be used and NTLM was rejected
Check that the PAM Machine uses the fully qualified host name, then work through the checks below
The connection fails when the PAM Machine uses an IP address or the domain name as its host
Kerberos needs the machine's own fully qualified host name
Use the value from Finding the machine's fully qualified host name
Windows Security log on the target shows Event 4625, Authentication Package NTLM, Status 0xC000006E
The Gateway fell back to NTLM
Kerberos requirements are not met; see below
Gateway debug log: Cannot find KDC for realm "CORP.EXAMPLE.COM"
The Gateway cannot locate a domain controller
Complete the DNS section
Gateway debug log: Cannot find KDC for realm "CORP"
The domain is a NetBIOS name
Use the UPN or the DNS domain in the PAM User record
Gateway debug log: does not specify default realm
The login has no domain
Use the UPN or set the Domain field
Connection fails with No route to host after changing DNS
Active Directory DNS returns an outdated address for the target
Correct the target's DNS record in Active Directory
To see the detailed Kerberos messages on a Docker Gateway, set LOG_LEVEL: "debug" in the Gateway container's environment, recreate the container, and reproduce the connection.
On the target machine, a successful Kerberos logon appears in the Windows Security log as Event 4624 with Authentication Package Kerberos.
Last updated

