All Projects → bolkedebruin → Rdpgw

bolkedebruin / Rdpgw

Licence: apache-2.0
Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Rdpgw

Myrtille
A native HTML4 / HTML5 Remote Desktop Protocol and SSH client
Stars: ✭ 1,007 (+1606.78%)
Mutual labels:  remote-desktop, rdp
RabbitRemoteControl
Remote control. Support VNC, RDP, Terminal, SSH, TELNET etc
Stars: ✭ 82 (+38.98%)
Mutual labels:  rdp, remote-desktop
Iap Desktop
IAP Desktop is a Windows application that provides zero-trust Remote Desktop and SSH access to Linux and Windows VMs on Google Cloud.
Stars: ✭ 96 (+62.71%)
Mutual labels:  remote-desktop, rdp
linux-remote-desktop
Linux based secure, open source, multi-tenant environment for remote work.
Stars: ✭ 89 (+50.85%)
Mutual labels:  rdp, remote-desktop
Freerdp
FreeRDP is a free remote desktop protocol library and clients
Stars: ✭ 5,858 (+9828.81%)
Mutual labels:  remote-desktop, rdp
Ipban
IPBan Monitors failed logins and bad behavior and bans ip addresses on Windows and Linux. Highly configurable, lean and powerful. Learn more at -->
Stars: ✭ 652 (+1005.08%)
Mutual labels:  remote-desktop, rdp
Premotem
Personal Remote Manager
Stars: ✭ 161 (+172.88%)
Mutual labels:  remote-desktop, rdp
workfromhome-with-docker
HTML5 based remote desktop gateway using Apache Guacamole and Traefik Reverse Proxy including AD authentication and 2-FA
Stars: ✭ 42 (-28.81%)
Mutual labels:  rdp, remote-desktop
Simpleremote
Remote Administration Tools
Stars: ✭ 504 (+754.24%)
Mutual labels:  remote-desktop, rdp
Mremoteng
mRemoteNG is the next generation of mRemote, open source, tabbed, multi-protocol, remote connections manager.
Stars: ✭ 5,935 (+9959.32%)
Mutual labels:  remote-desktop, rdp
Rdesktop
🚨 rdesktop is in need of a new maintainter. Please see the home page for more details. 🚨
Stars: ✭ 922 (+1462.71%)
Mutual labels:  remote-desktop, rdp
Homebridge Mi Gateway Fm
XiaoMi Gateway FM plugin for HomeBridge.
Stars: ✭ 43 (-27.12%)
Mutual labels:  gateway
Cj
CJ is a Discord bot that hangs around in the open.mp/burgershot.gg community discord.
Stars: ✭ 34 (-42.37%)
Mutual labels:  golang-application
Pxe Vagrant
a Preboot Execution Environment (PXE) gateway
Stars: ✭ 33 (-44.07%)
Mutual labels:  gateway
Biboumi
IRC gateway for XMPP
Stars: ✭ 51 (-13.56%)
Mutual labels:  gateway
Vbridge
X11 Cloud desktop software
Stars: ✭ 33 (-44.07%)
Mutual labels:  remote-desktop
Plugins
Plugins for SmartHomeNG - The device integration platform for your smart home
Stars: ✭ 32 (-45.76%)
Mutual labels:  gateway
Agente
Distributed simple and robust release management and monitoring system.
Stars: ✭ 30 (-49.15%)
Mutual labels:  golang-application
Readimension
eBook server supporting ePub and Authentication
Stars: ✭ 29 (-50.85%)
Mutual labels:  golang-application
Seth
Perform a MitM attack and extract clear text credentials from RDP connections
Stars: ✭ 1,084 (+1737.29%)
Mutual labels:  rdp

GO Remote Desktop Gateway

Go

⭐️ Star us on GitHub — it helps!

RDPGW is an implementation of the Remote Desktop Gateway protocol. This allows you to connect with the official Microsoft clients to remote desktops over HTTPS. These desktops could be, for example, XRDP desktops running in containers on Kubernetes.

AIM

RDPGW aims to provide a full open source replacement for MS Remote Desktop Gateway, including access policies.

Multi Factor Authentication (MFA)

RDPGW provides multi factor authentication out of the box with OpenID Connect integration. Thus you can integrate your remote desktops with Keycloak, Okta, Google, Azure, Apple or Facebook if you want.

Security

RDPGW wants to be secure when you set it up from the beginning. It does this by having OpenID Connect integration enabled by default. Cookies are encrypted and signed on the client side relying on Gorilla Sessions. PAA tokens (gateway access tokens) are generated and signed according to the JWT spec by using jwt-go signed with a 256 bit HMAC. Hosts provided by the user are verified against what was provided by the server. Finally, the client's ip address needs to match the one it obtained the token with.

How to build

cd rdpgw
go build -o rdpgw .

Configuration

By default the configuration is read from rdpgw.yaml. Below is a template.

# web server configuration. 
server:
 # TLS certificate files (required)
 certFile: server.pem
 keyFile: key.pem
 # gateway address advertised in the rdp files
 gatewayAddress: localhost
 # port to listen on
 port: 443
 # list of acceptable desktop hosts to connect to
 hosts:
  - localhost:3389
  - my-{{ preferred_username }}-host:3389
  # Allow the user to connect to any host (insecure)
  - any 
 # if true the server randomly selects a host to connect to
 roundRobin: false 
 # a random strings of at least 32 characters to secure cookies on the client
 # make sure to share this across the different pods
 sessionKey: thisisasessionkeyreplacethisjetzt
 sessionEncryptionKey: thisisasessionkeyreplacethisnunu!
 # tries to set the receive / send buffer of the connections to the client
 # in case of high latency high bandwidth the defaults set by the OS might
 # be to low for a good experience
 # receiveBuf: 12582912
 # sendBuf: 12582912 
# Open ID Connect specific settings
openId:
 providerUrl: http://keycloak/auth/realms/test
 clientId: rdpgw
 clientSecret: your-secret
# enabled / disabled capabilities
caps:
 smartCardAuth: false
 tokenAuth: true
 # connection timeout in minutes, 0 is limitless
 idleTimeout: 10
 enablePrinter: true
 enablePort: true
 enablePnp: true
 enableDrive: true
 enableClipboard: true
client:
  # this is a go string templated with {{ username }} and {{ token }}
  # the example below uses the ASCII field separator to distinguish
  # between user and token 
  usernameTemplate: "{{ username }}@bla.com\x1f{{ token }}"
  # rdp file settings see: 
  # https://docs.microsoft.com/en-us/windows-server/remote/remote-desktop-services/clients/rdp-files
  networkAutoDetect: 0
  bandwidthAutoDetect: 1
  ConnectionType: 6
  # If true puts splits "[email protected]" into the user and domain component so that
  # domain gets set in the rdp file and the domain name is stripped from the username
  SplitUserDomain: false
security:
  # a random string of at least 32 characters to secure cookies on the client
  # make sure to share this amongst different pods
  PAATokenSigningKey: thisisasessionkeyreplacethisjetzt
  # PAATokenEncryptionKey: thisisasessionkeyreplacethisjetzt
  UserTokenEncryptionKey: thisisasessionkeyreplacethisjetzt
  # if you want to enable token generation for the user
  # if true the username will be set to a jwt with the username embedded into it
  EnableUserToken: true
  # Verifies if the ip used to connect to download the rdp file equals from where the
  # connection is opened.
  VerifyClientIp: true

Testing locally

A convenience docker-compose allows you to test the RDPGW locally. It uses Keycloak and xrdp and exposes it services on port 443. You will need to allow your browser to connect to localhost with and self signed security certificate. For chrome set chrome://flags/#allow-insecure-localhost. The username to login to both Keycloak and xrdp is admin as is the password.

cd dev/docker
docker-compose build
docker-compose up

Use

Point your browser to https://your-gateway/connect. After authentication and RDP file will download to your desktop. This file can be opened by one of the remote desktop clients and it will try to connect to the gateway and desktop host behind it.

Integration

The gateway exposes an endpoint for the verification of user tokens at https://yourserver/tokeninfo . The query parameter is 'access_token' so you can just do a GET to https://yourserver/tokeninfo?access_token= . It will return 200 OK with the decrypted token.

In this way you can integrate, for example, it with pam-jwt.

TODO

  • Integrate Open Policy Agent
  • Integrate GOKRB5
  • Integrate uber-go/zap
  • Research: TLS defragmentation
  • Improve Web Interface
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].