xpam.pl

Conencting to SafeGuard RDP via FreeRDP on Linux

On Linux, Remmina/KRCD/freerdp do not work out of the box with SafeGuard remote access.

When you connect, see the SafeGuard welcome/approval screen, click accept, and then… the window either shows “no auth n/a” and disconnects, or freezes indefinitely.

What’s actually happening?

The SafeGuard bastion uses a two-stage connection:

1. First hop — your client connects to the bastion proxy over TLS. The vault token in the username authenticates you. The bastion shows a welcome screen.
2. Second hop — after you accept the welcome screen, the bastion sends an RDP Server Redirection PDU containing credentials (username, domain, password) for the target machine. Your FreeRDP client follows the redirect and establishes a new connection, this time with NLA (Network Level Authentication) required by the target.

 

When FreeRDP performs NLA on the redirect, it uses SPNEGO which tries Kerberos first. If the KDC for the target domain is unreachable from your machine (common when the domain controller is behind the bastion), Kerberos times out before falling back to NTLM.
Worse: FreeRDP 3.14 and 3.15 (the versions shipped with Debian Trixie and the Remmina snap as of early 2026) crash with SIGABRT instead of falling back to NTLM. This is fixed in FreeRDP 3.22+.

To make everything work on Trixie, we need:
1. FreeRDP nightly (3.22+) which properly falls back from Kerberos to NTLM
2. A minimal krb5.conf that disables DNS-based KDC discovery, so Kerberos fails instantly instead of hanging.

 

 

Installing FreeRDP nightly on Debian Trixie

Add the nightly repository and GPG key (as root):

wget -qO- http://pub.freerdp.com/repositories/ADD6BF6D97CE5D8D.asc \
 | gpg --dearmor | sudo tee /usr/share/keyrings/freerdp-nightly.gpg > /dev/null

# Add the repository
cat <<EOF | sudo tee /etc/apt/sources.list.d/freerdp-nightly.sources
Types: deb
URIs: http://pub.freerdp.com/repositories/deb/trixie
Suites: freerdp-nightly
Components: main
Signed-By: /usr/share/keyrings/freerdp-nightly.gpg
EOF

# Install
apt update
apt install freerdp-nightly

The nightly package installs to /opt/freerdp-nightly/ and does not conflict with the system FreeRDP.

The connect script

#!/bin/bash
set -euo pipefail

TOKEN="${1:?Usage: $0 <vault-string>}"

# Minimal krb5.conf that disables DNS-based KDC discovery.
# Without this, Kerberos hangs trying to contact a KDC
KRB5_CONF=$(mktemp)
trap "rm -f '$KRB5_CONF'" EXIT
cat > "$KRB5_CONF" <<'EOF'
[libdefaults]
   dns_lookup_kdc = false
   dns_lookup_realm = false
   udp_preference_limit = 0
   kdc_timeout = 1
EOF

LD_LIBRARY_PATH=/opt/freerdp-nightly/lib \
KRB5_CONFIG="$KRB5_CONF" \
/opt/freerdp-nightly/bin/xfreerdp3 \
 /v:bastion.example.com:4444 \
 /u:"$TOKEN" \
 /p: /d: \
 /cert:ignore \
 /auth-pkg-list:ntlm \
 /relax-order-checks \
 +clipboard \
 /drive:share,"$HOME/remmina"

Usage:

chmod +x connect.sh
./connect.sh 'vaultaddress~connection-string'

What each flag does:
/u:$TOKEN | Full vault connection string as the username.
/p: /d: | Empty password and domain (avoids interactive prompts).
/cert:ignore | Skip certificate validation for the bastion.
/auth-pkg-list:ntlm | Tell SPNEGO to prefer NTLM (Kerberos still tried by library internals, but the custom krb5.conf makes it fail fast).
/relax-order-checks | Tolerate out-of-order RDP packets from the bastion.
+clipboard | Enable clipboard sharing.
/drive:share,$HOME/remmina | Share a local directory into the RDP session.

As of early 2026, both the Remmina snap (stable and edge) and the Debian Trixie package bundle FreeRDP 3.14, which crashes on the Kerberos-to-NTLM fallback during the bastion redirect.

If you run into issues, enable trace logging by prepending WLOG_LEVEL=TRACE to the command.

2 Total Views 2 Views Today


Cen
GitHub
Eurobattle.net
Lagabuse.com
Bnetdocs

Posted

in

,

by

Tags: