RDPGW supports NTLM authentication for simple setup with Windows clients, particularly useful for small deployments with a limited number of users.
- Easy Setup: Simple configuration without external dependencies
- Windows Client Support: Works with default Windows client
mstsc - No External Services: Self-contained authentication mechanism
- Quick Deployment: Ideal for small teams or testing environments
Configure RDPGW to use NTLM authentication:
Server:
Authentication:
- ntlm
Caps:
TokenAuth: falseCreate configuration file for rdpgw-auth with user credentials:
# /etc/rdpgw-auth.yaml
Users:
- Username: "alice"
Password: "secure_password_1"
- Username: "bob"
Password: "secure_password_2"
- Username: "admin"
Password: "admin_secure_password"Run the rdpgw-auth helper with NTLM configuration:
./rdpgw-auth -c /etc/rdpgw-auth.yaml -s /tmp/rdpgw-auth.sock- Client initiates NTLM handshake with gateway
- Gateway forwards NTLM messages to
rdpgw-auth - Helper validates credentials against configured user database
- Client connects directly on successful authentication
Edit the configuration file and restart the helper:
Users:
- Username: "newuser"
Password: "new_secure_password"
- Username: "existing_user"
Password: "existing_password"- Update passwords in configuration file
- Restart
rdpgw-authhelper - Notify users of password changes
Remove user entries from configuration and restart helper.
Create /etc/systemd/system/rdpgw-auth.service:
[Unit]
Description=RDPGW NTLM Authentication Helper
After=network.target
[Service]
Type=simple
User=rdpgw
ExecStart=/usr/local/bin/rdpgw-auth -c /etc/rdpgw-auth.yaml -s /tmp/rdpgw-auth.sock
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target# docker-compose.yml
services:
rdpgw-auth:
image: rdpgw-auth
volumes:
- ./rdpgw-auth.yaml:/etc/rdpgw-auth.yaml:ro
- auth-socket:/tmp
restart: always
rdpgw:
image: rdpgw
volumes:
- auth-socket:/tmp
depends_on:
- rdpgw-auth
volumes:
auth-socket:apiVersion: v1
kind: ConfigMap
metadata:
name: rdpgw-auth-config
data:
rdpgw-auth.yaml: |
Users:
- Username: "user1"
Password: "password1"
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: rdpgw-auth
spec:
template:
spec:
containers:
- name: rdpgw-auth
image: rdpgw-auth
volumeMounts:
- name: config
mountPath: /etc/rdpgw-auth.yaml
subPath: rdpgw-auth.yaml
volumes:
- name: config
configMap:
name: rdpgw-auth-configNTLM authentication works seamlessly with the default Windows Remote Desktop client:
- Configure gateway address in RDP settings
- Save gateway credentials when prompted
- Connect using domain credentials or local accounts
NTLM is widely supported across RDP clients:
- mRemoteNG (Windows)
- Royal TS/TSX (Windows/macOS)
- Remmina (Linux)
- FreeRDP (Cross-platform)
Secure the configuration file:
sudo chown rdpgw:rdpgw /etc/rdpgw-auth.yaml
sudo chmod 600 /etc/rdpgw-auth.yaml- Use strong, unique passwords for each user
- Implement regular password rotation
- Avoid reusing passwords from other systems
- Consider minimum password length requirements
- Deploy gateway behind TLS termination
- Use private networks when possible
- Implement network-level access controls
- Monitor authentication logs for suspicious activity
- Limit user accounts to necessary personnel only
- Regularly audit user list and remove inactive accounts
- Use principle of least privilege
- Consider time-based access restrictions
For production environments, consider migrating to more secure authentication methods:
- Better password security (hashed storage)
- MFA support
- Centralized user management
- SSO integration
- No password storage in gateway
- Enterprise authentication integration
- Stronger cryptographic security
- Seamless Windows domain integration
- Authentication Failed: Verify username/password in configuration
- Helper Not Running: Check if
rdpgw-authprocess is active - Socket Errors: Verify socket path and permissions
# Check helper process
ps aux | grep rdpgw-auth
# Verify configuration
cat /etc/rdpgw-auth.yaml
# Test socket connectivity
ls -la /tmp/rdpgw-auth.sock
# Monitor authentication logs
journalctl -u rdpgw-auth -fEnable debug logging in rdpgw-auth for detailed NTLM protocol analysis:
./rdpgw-auth -c /etc/rdpgw-auth.yaml -s /tmp/rdpgw-auth.sock -vPlanned improvements for NTLM authentication:
- Database Backend: Support for SQLite/PostgreSQL user storage
- Password Hashing: Secure password storage options
- Group Support: Role-based access control
- Audit Logging: Enhanced security monitoring