Understanding RD Gateway Server
What is an RD Gateway Server?
An RD Gateway Server, or Remote Desktop Gateway, is a specialized server role in the Microsoft Windows Server operating system. Its primary function is to enable secure remote access to resources within a corporate network. It acts as a gateway or intermediary between remote users and the internal network, ensuring that remote desktop connections are both secure and efficient.
The Role of RD Gateway Server
The RD Gateway Server plays a pivotal role in the following scenarios:
Remote Desktop Access: It allows remote users to establish secure connections to internal desktops, applications, and servers, using the Remote Desktop Protocol (RDP).
Security: It provides a security layer by enforcing network-level authentication, encrypting data during transit, and protecting against unauthorized access.
Firewall Bypass: It enables remote desktop connections even when there are firewalls or network address translation (NAT) devices in place.
RD Gateway Server in Action
To understand the practical applications and significance of an RD Gateway Server, let’s examine how it works in various scenarios:
Secure Remote Desktop Access
RD Gateway Server ensures that remote desktop connections are encrypted and secure. When a remote user initiates an RDP session, the gateway authenticates the user, validates the request, and establishes a secure channel to the target system. This ensures that sensitive data remains protected during transmission.
Simplifying Remote Access
With an RD Gateway Server in place, remote users do not need to configure complex network settings or virtual private network (VPN) connections. They can connect to internal resources using familiar RDP client applications.
BYOD and Remote Work
In the era of bring-your-own-device (BYOD) and remote work, RD Gateway Server facilitates secure access to corporate resources from personal devices, ensuring that data remains protected regardless of the user’s location.
Configuring RD Gateway Server
RD Gateway Manager
The RD Gateway Manager is a central tool for configuring and managing RD Gateway Server settings. Administrators can use this graphical user interface to set up policies, manage certificates, configure user authentication methods, and monitor remote desktop sessions.
RD Gateway Server Settings
Key settings within the RD Gateway Manager include:
Resource Authorization Policies (RAP): These policies control which users can access specific resources on the internal network.
Connection Authorization Policies (CAP): CAPs determine who is allowed to connect to the RD Gateway Server.
Network Policies: These policies manage how users authenticate and access resources, providing flexibility for different scenarios.
RD Gateway Server on Different Platforms
Remote Desktop Gateway Windows 10
While RD Gateway Server is typically associated with Windows Server operating systems, it can also be utilized in Windows 10 environments. By configuring a Windows 10 computer as an RD Gateway Server, users can establish secure remote connections to their Windows 10 systems.
Flash Sale to May 6
Lite Dedicated Server — SSD
$ 36.00/mo
Save 26% Lifetime (Was $49.00)
1mo3mo12mo24mo
Order Now
- 16GB RAM
- 4-Core E3-1220 @3.10 GHz
- 480GB SSD + 500GB SATA
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
Flash Sale to May 6
Express Dedicated Server — RAID
$ 43.40/mo
45% OFF Recurring (Was $79.00)
1mo3mo12mo24mo
Order Now
- 32GB RAM
- 4-Core E3-1270v3 @3.50 GHz
- 2x1TB SSD RAID 1 + 2TB SATA
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
Basic Dedicated Server — RAID
$ 129.00/mo
1mo3mo12mo24mo
Order Now
- 64GB RAM
- 8-Core E5-2667v4 @3.20 GHz
- 2x2TB SSD RAID 1 + 4TB SATA
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
Professional Dedicated Server — RAID
$ 229.00/mo
1mo3mo12mo24mo
Order Now
- 128GB RAM
- 16-Core Dual E5-2667v4 @3.20 GHz
- 4x1TB SSD RAID 10 + 8TB SATA
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
RD Gateway on Linux
While RD Gateway Server is a Microsoft technology, Linux users can access Windows remote desktops through third-party RDP clients that support RD Gateway functionality. This enables Linux users to securely connect to Windows systems in a mixed environment.
Express Dedicated Server — SSD
$ 49.00/mo
1mo3mo12mo24mo
Order Now
- 32GB RAM
- 4-Core E3-1230 @3.20 GHz
- 120GB SSD + 960GB SSD
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
Basic Dedicated Server — SSD
$ 69.00/mo
1mo3mo12mo24mo
Order Now
- 64GB RAM
- 8-Core E5-2670 @2.60 GHz
- 120GB SSD + 960GB SSD
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
Professional Dedicated Server — SSD
$ 99.00/mo
1mo3mo12mo24mo
Order Now
- 128GB RAM
- 16-Core Dual E5-2660 @2.20 GHz
- 120GB SSD + 960GB SSD
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
Flash Sale to May 6
Advanced Dedicated Server — SSD
$ 84.30/mo
50% OFF First Month (Was $169.00)
1mo3mo12mo24mo
Order Now
- 256GB RAM
- 24-Core Dual E5-2697v2 @2.70 GHz
- 120GB SSD + 2TB SSD
- 100Mbps-1Gbps Bandwidth
- OS : Windows / Linux
- 1 Dedicated IPv4 IP
- No Setup Fee
- $84.30 first month, then enjoy a 30% discount ($118.30/mo) for renewals.
Security Considerations
Security is paramount in remote access solutions. RD Gateway Server offers several security measures to protect connections:
Network-Level Authentication (NLA): RD Gateway requires NLA, ensuring that users are authenticated before they establish a connection.
Data Encryption: All data transmitted through the RD Gateway is encrypted to protect against eavesdropping and data theft.
Account Lockout Policies: Implementing account lockout policies can prevent brute force attacks and unauthorized access attempts.
Secure Sockets Layer (SSL) Certificates: SSL certificates are used to authenticate the RD Gateway Server to remote clients, ensuring that the connection is trustworthy.
Conclusion
RD Gateway Server is a crucial component in modern remote access solutions, providing secure, efficient, and user-friendly remote desktop connections. Whether used in Windows Server environments or extended to other platforms, RD Gateway Server simplifies remote access while prioritizing security.
As remote work and BYOD become increasingly prevalent, the role of RD Gateway Server continues to grow, making it an essential tool for businesses and organizations. By understanding its capabilities, configurations, and security measures, administrators can harness the full potential of RD Gateway Server to meet the evolving needs of remote connectivity.
How to access a Windows 10 computer remotely?
Steps To Remotely Control Another Computer Without Any Tool In Windows 10
- First of all, in your Windows 10 got to your system settings by clicking on the Windows button on your keyboard and then entering ‘System.’
- In a system setting, you need to select the Remote Settings on the left of the screen.
- Now there enable the Allow remote connections to this computer option.
More items…
How to setup a remote desktop gateway?
Summary of Steps Required to Configure a Remote Desktop Gateway Windows Server 2016
- Join the Windows 2016 server to the Active Directory domain.
- Add the Remote Desktop Services role.
- Create a Connection Authorization Policy. …
- Create a Resource Authorization Policy. …
- Purchase an SSL Certificate from a public Certificate Authority. …
- Apply the SSL Certificate to the Remote Desktop Gateway.
More items…
How to enable allow remote connection in Windows 10?
Steps to enable allow remote connection in Windows 10:
- Open System using Windows+Pause Break.
- Choose Remote settings in the System window.
- Select Allow remote connections to this computer and tap OK in the System Properties dialog.
How do you turn on Remote Desktop Access?
Here is how to do this work in Windows Settings:
- Click the start icon and tap on Settings to open this app.
- Under the System tab, click Remote Desktop.
- Turn on remote desktop by switching the toggle to On.
How do I access my Remote Desktop gateway?
3.2 Configuring Remote Desktop ClientOn a client machine, run mstsc.Click Show Options and select Advanced.Click Settings and select Use these RD Gateway server settings. … Go to the General tab and specify the address of remote RDP (Remote Desktop Protocol) server.Click Connect.More items…
What is a remote access gateway?
Remote Desktop Gateway (RDG or RD Gateway) is a Windows Server role that provides a secure encrypted connection to the server via RDP. It enhances control by removing all remote user access to your system and replaces it with a point-to-point remote desktop connection.
How do I setup a Remote Desktop gateway?
Configure the RD Gateway role Open the Server Manager, then select Remote Desktop Services. Go to Servers, right-click the name of your server, then select RD Gateway Manager. In the RD Gateway Manager, right-click the name of your gateway, then select Properties.
Is Remote Desktop gateway required?
Answers. RD Gateway is absolutely required to make RemoteApp programs available from the Internet. Alternatively, if you do not want to deploy RD Gateway, you can make RemoteApp programs available through a VPN solution. It’s not required for internal users and you can establish secure connection without it.
What is remote gateway in VPN?
A VPN gateway is a type of networking device that connects two or more devices or networks together in a VPN infrastructure. It is designed to bridge the connection or communication between two or more remote sites, networks or devices and/or to connect multiple VPNs together.
What are the benefits of remote desktop gateway?
5 useful benefits of using RDP GatewayProvides certificate authentication and MFA on an RDP gateway. … There is no need to VPN. … Make a reliable connection. … RDP gateway includes as a service in Windows server. … One connection many connections.
What is a gateway server?
A ‘gateway server’ acts as a middleman, brokering transactions between a client computer and another server. This configuration is typically used to serve content to clients that would otherwise be unable to access the remote server, but it can be used to impose additional security restrictions on the client.
What port does remote desktop gateway use?
Remote Desktop Servers typically use port 3389. To enable Remote Desktop Servers to be accessed over the internet, you must enable/forward TCP Port 3389 to the Remote Desktop Server.
How do I remote desktop to another computer over the internet?
To remotely access another computer within your network over the internet, open the Remote Desktop Connection app and enter that computer’s name, and your username and password. Click the magnifying glass icon in the bottom-left corner of your screen. Do this from the computer you want to access over the internet.
What is the main purpose of a RAS server?
A remote access server (RAS) is a type of server that provides a suite of services to remotely connected users over a network or the Internet. It operates as a remote gateway or central server that connects remote users with an organization’s internal local area network (LAN).
What is remote access examples?
Accessing, writing to and reading from, files that are not local to a computer can be considered remote access. For example, storing and access files in the cloud grants remote access to a network that stores those files. Examples of include services such as Dropbox, Microsoft One Drive, and Google Drive.
What is remote access explain with example?
Remote access refers to the ability to access a computer, such as a home computer or an office network computer, from a remote location. This allows employees to work offsite, such as at home or in another location, while still having access to a distant computer or network, such as the office network.
What is a remote access device?
Remote access (or remote desktop) is the ability to access a computer or device from another device, at any time, and from anywhere.
Advantages of RD Gateway
RD Gateway uses the Remote Desktop Protocol (RDP) over HTTPS to establish a secure, encrypted connection between remote users on the Internet and the internal network resources on which their productivity applications run.
STEP 2
In Server Manager, Select Manage, then Select Add Roles and Features. The Add Roles and Features installer will open.
STEP 3
Before You Begin, Select Next and Select Role-Based or feature-based installation, then select Next.
STEP 4
For Select destination server, select Select a server from the server pool. For Server Pool, select the name of your local computer. When you’re done, select Next.
STEP 5
In Select Server Roles > Roles, select Remote Desktop Services and Select Next.
STEP 11
From Confirm installation selections, select Install. Don’t close the installer while the installation process is happening.
STEP 13
Open the Remote Desktop Gateway Manager. This is done from the Tools menu from Server Manager.
What is the remote access gateway?
The Remote Access Gateway provides employees and authorized affiliates with secure, remote access to applications and systems at the University of Vermont Medical Center. For additional support you can contact the IS Service Center by calling (802) 847-1414.
How to add remote access gateway to trusted sites?
PCs only: Add the Remote Access Gateway URL to your list of Trusted Sites. Open the Control Panel on your PC. Open Internet Options. Go to the Security tab, click on Trusted Sites, and then click Sites.
How to set permissions to read and write in Citrix?
Open Connection Center. Click on your Citrix session to highlight it, then open Preferences. On the File Access tab, set permissions to Read and Write, then click OK.
Why is https://workspace.uvmhealth.org added to trusted sites?
https://workspace.uvmhealth.org must be added to Trusted Sites to prevent being prompted to download or run an . ica file when launching applications. Please see the Setup and configuration section above for instructions.
Can Citrix access local resources?
If you did not allow access to your local PC resources when launching an application for the first time, the Citrix session will not be permitted to access your local PC resources, like your printer. You will need to reset the security settings to allow access in order to print. Launch an application.
What is application proxy?
Application Proxy can also enforce any Conditional Access policies. Remote Desktop Services: Acts as a platform for individual virtualized applications, providing secure mobile and remote desktop access, and providing end users the ability to run their applications and desktops from the cloud.
What is RDS deployment?
A standard Remote Desktop Services (RDS) deployment includes various Remote Desktop role services running on Windows Server. The RDS deployment with Azure Active Directory (Azure AD) Application Proxy has a permanent outbound connection from the server running the connector service. Other deployments leave open inbound connections through a load balancer. This authentication pattern allows you to offer more types of applications by publishing on-premises applications through Remote Desktop Services. It also reduces the attack surface of their deployment by using Azure AD Application Proxy.
Do you need to provide remote access to remote desktop services?
You need to provide remote access and protect your Remote Desktop Services deployment with pre-authentication.
What is a RADIUS certificate?
In RADIUS certificate authentication, the authentication request is forwarded to a RADIUS server that handles the actual certificate validation. This option is useful if you want to integrate with a certificate authentication infrastructure that you already have through RADIUS.
Can a syslog be routed over a site to site connection?
No. It can only be routed over a Site-to-Site connection.
Can a point to site client connect to a VNet?
Yes, Point-to-Site client connections to a virtual network gateway that is deployed in a VNet which is peered with other VNets may have access to other peered VNets. Point-to-Site clients will be able to connect to peered VNets as long as the peered VNets are using the UseRemoteGateway / AllowGatewayTransit features.
Does Radius support OpenVPN?
RADIUS authentication is supported for the OpenVPN protocol only through PowerShell.
How to connect to RD gateway?
The three primary purposes of the RD Gateway, in the order of the connection sequence, are: 1 Establish an encrypted SSL tunnel between the end-user’s device and the RD Gateway Server: In order to connect through any RD Gateway server, the RD Gateway server must have a certificate installed that the end-user’s device recognizes. In testing and proofs of concepts, self-signed certificates can be used, but only publicly trusted certificates from a certificate authority should be used in any production environment. 2 Authenticate the user into the environment: The RD Gateway uses the inbox IIS service to perform authentication, and can even utilize the RADIUS protocol to leverage multi-factor authentication solutions such as Azure MFA. Aside from the default policies created, you can create additional RD Resource Authorization Policies (RD RAPs) and RD Connection Authorization Policies (RD CAPs) to more specifically define which users should have access to which resources within the secure environment. 3 Pass traffic back and forth between the end-user’s device and the specified resource: The RD Gateway continues to perform this task for as long as the connection is established. You can specify different timeout properties on the RD Gateway servers to maintain the security of the environment in case the user walks away from the device.
Can end users connect to internal network resources securely from outside the corporate firewall?
End users can connect to internal network resources securely from outside the corporate firewall through RD Gateway.
How to request remote access VA?
You may request remote access by visiting the Remote Access Self Service Portal ( only available while on VA’s internal network).
What is a rescue GFE?
RESCUE GFE provides a security posture check and ensures VA data is encrypted from the end device into the VA trusted network. Prior to the device connecting and being allowed onto the VA trusted network the system is checked for multiple security baselines.
What is CAG 2FA?
CAG requires 2 Factor Authentication (2FA) by default for all users. The methods supported include PIV, CAC, and MobilePASS.
How to disable automatic server selection in VPN?
In the VPN tab of the setting screen, uncheck Enable automatic server selection. Close the settings.
Is VA responsible for non-VA websites?
This page includes links to other websites outside our control and jurisdiction. VA is not responsible for the privacy practices or the content of non-VA Web sites. We encourage you to review the privacy policy or terms and conditions of those sites to fully understand what information is collected and how it is used.
Does RESCUE GFE support Windows 10?
This software is installed on all GFE laptops prior to being provided to the user. Currently RESCUE GFE supports Windows 7, Windows 8, Windows 10 and MAC OSX.
Company Laptop & VPN
Employees using company-owned laptop computers have full access to company resources when connected to our company VPN. The use of VPN requires a reliable broadband internet connection (wired preferred) with a suggested download speed of 20Mbps or more.
Mobile Devices
Some company resources are available via a personal mobile device enrolled in our BYOD program. This includes access to e-mail, calendar, contacts, and a variety of company-specific apps. BYOD is available for the latest Apple and Android mobile devices. To get started with BYOD, visit our BYOD page and follow the instructions.
Kindred Workspace
Some company resources are also available to employees using a personal computer. Kindred Workspace provides access to numerous systems and services and leverages our identity verification system for secured access. Click the logo below to launch your personal company workspace.
Popular Posts:
Хочу поделиться несколькими советами по настройке удаленного подключения к рабочим местам по RDP. Расскажу как проапгрейдить древний RPC-HTTP до UDP, похвалю и поругаю Windows 10 и AVC, разберу решение нескольких типичных проблем.
Считаем, что для подключения используется Remote Desktop Gateway (RDGW), а в качестве серверов выступают рабочие станции. Использовать RDGW очень удобно, потому что шлюз становится общей точкой входа для всех клиентов. Это дает возможность лучше контролировать доступ, вести учет подключений и их продолжительность. Даже если VPN позволяет подключиться к рабочим машинам напрямую — это не лучший вариант.
RDGW настраивается быстро, просто, а Let’s Encrypt и win-acme легко решают проблему с доверенным сертификатом.
Есть три транспортных протокола по которым клиент может подключиться с серверу:
RPC-HTTP (
плохо)
HTTP (лучше)
HTTP+UDP (отлично)
Под сервером будем понимать рабочую машину, под клиентом — домашнюю.
Первое, с чего стоит начать, это «плохо» превратить в «отлично».
Апгрейд RPC-HTTP до HTTP
Подключение в сессию с использованием RPC-HTTP легко определить по внешнему виду полоски подключения.
Здесь нет значка качества подключения (о нем ниже), а значит мы используем старый RPC, обернутый в TLS — это очень медленно. Дело, конечно, не только в обертке — сам протокол меняется с каждым релизом ОС, меняются кодеки, алгоритмы упаковки изображения. Чем свежее протокол, тем лучше.
Что делать?
Windows XP или Vista
В XP можно поднять протокол с 5.1 до 7. Хотфикс windowsxp-kb969084-x86.exe
В Vista — c 6 до 7. Хотфикс имеет тот же номер, файлы windows6.0-kb969084-x64.msu или Windows6.0-KB969084-x86.msu
Но RDP 7 не работает по HTTP и UDP. Поможет только апгрейд клиента и сервера до Windows 7 и новее.
Windows 7
Сначала надо обновить протокол до RDP 8.1, а затем включить его. Поддержка добавляется обновлениями, которые сгруппированы в один загрузочный пакет:
www.microsoft.com/en-US/download/details.aspx?id=40986
Windows6.1-KB2574819-v2-x64.msu
windows6.1-kb2592687-x64.msu
Windows6.1-KB2830477-x64.msu
Windows6.1-KB2857650-x64.msu
Windows6.1-KB2913751-x64.msu
(заменен kb2923545)
windows6.1-kb2923545-x64.msu
Так вы получите и свежий клиент mstsc.exe, и поддержку RDP 8.1 серверной части ОС.
Было:
Стало:
После этого протокол надо включить ключом реестра (для этого можно использовать adm шаблон в комплекте с Windows 7).
[HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows NT\Terminal Services]
"fServerEnableRDP8"=dword:00000001
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Policies\Microsoft\Windows NT\Terminal Services]
"fServerEnableRDP8"=dword:00000001
Включите поддержку транспорта UDP в групповой политике.
Перезагружаем сервер с Windows 7. Тот самый случай, когда может потребоваться перезагрузиться дважды — значение в реестре должно быть установлено до того, как включился RDP, а групповая политика применяется позже.
Если все получилось, то при подключении к серверу в полоске сессии появится иконка качества подключения (как в телефоне для мобильной сети):
Windows 8 и новее
Протокол работает «из коробки».
Апгрейд HTTP до HTTP+UDP
Если ваша сеть не склонна к потере пакетов, UDP существенно (для CAD — радикально) повышает отзывчивость сервера за счет использования FEC для сокращения ретрансмиссии, а также перехода подтверждения доставки пакетов с уровня системного стека TCP/IP на уровень протокола RDP-UDP.
От каждого клиента подключается одна основная управляющая сессия по HTTP (в этом канале также передается клавиатура/мышь), плюс одна или несколько сессий UDP для передачи картинки или других виртуальных каналов.
Мы коснемся только верхушки айсберга. Есть 3 различных версии протокола RDP-UDP. Кроме того, сам UDP может работать в двух режимах UDP-R (reliable) и UDP-L (lossy). С Microsoft ничего просто не бывает. Но поскольку от нас здесь ничего не зависит, просто имейте в виду — чем новее операционная система, теме более современный протокол используется.
Снаружи RDP-UDP оборачивается в Datagram Transport Layer Security (DTLS) RFC4347, в чем вы можете убедиться открыв Wireshark.
Подробнее в документах:
[MS-RDPEMT]: Remote Desktop Protocol: Multitransport Extension
[MS-RDPEUDP]: Remote Desktop Protocol: UDP Transport Extension
[MS-RDPEUDP2]: Remote Desktop Protocol: UDP Transport Extension Version 2
Где не прав — поправьте, пожалуйста.
Что же нужно для включения UDP?
RDP-UDP поддерживается начиная с RDP 8.
На клиенте должен быть открыт порт udp/3389. Если вы его закрыли локальным firewall, ACL на свитче или внешнем файрволле — порт надо открыть.
Для сервера Remote Desktop Gateway к порту tcp/443 надо открыть udp/3391.
Порт можно поменять, вот как он настраивается:
Для Windows 7 обязательно должен быть включен NLA (Network Level Authentication).
Можно включить в групповой политике
или через реестр
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp]
"SecurityLayer"=dword:00000001
В чем связь непонятно. Но без NLA на 7-ке не работает, на более свежих релизах NLA для работы UDP не обязателен.
После установления сессии по HTTP, клиент и сервер пробуют согласовать подключение по UDP. Если есть выпадение пакетов или задержки, то сессия UDP не запустится. Точный алгоритм отказа согласования UDP до конца не понятен.
Если все настроено, то после подключения нажмите на кнопку качества связи. В окошке будет указано, что согласован UDP.
На шлюзе это выглядит так:
Windows 10
Если у вас Windows 10 и на сервере, и на клиенте, то это самый быстрый и беспроблемный вариант. В Microsoft активно дорабатывают RDP, и в свежих релизах 10 вы можете рассчитывать на неплохую скорость работы. Коллеги не смогли обнаружить разницу между Citrix и Windows 10 RDP по скорости работы в AutoCAD.
Про эволюцию кодеков RDP на базе AVC в Windows 10 есть хорошая статья
Remote Desktop Protocol (RDP) 10 AVC/H.264 improvements in Windows 10 and Windows Server 2016 Technical Preview
Согласование AVC с аппаратным кодированием можно увидеть в журнале событий (подробнее в статье выше):
Замечу только, что проблема искажений все же есть даже с h.264 4:4:4. Она сразу бросается в глаза если работать в PowerShell ISE — текст ошибок выводится с неприятным искажением. Причем на скриншоте и на фотографии все отлично. Волшебство.
Также косвенным признаком работы AVC являются время от времени появляющиеся зеленые квадраты по углам.
AVC и аппаратное кодирование в свежих билдах должно работать из коробки, но групповая политика никогда не бывает лишней:
С учетом того, что AVC кодируется аппаратно видеокартой, то обновить драйверы видео — хорошая идея.
О проблемах
XP и Vista
Если проблема возникает на Windows XP или Vista, попробуйте сначала обновить протокол до 7 версии (писал в начале статьи). Обязательно включите поддержку CredSSP. На сайте Microsoft статьи уже удалены, но Интернет помнит.
Если не помогло — «доктор говорит в морг, значит в морг». Что испытала на себе операционная система за последние 15 лет — лучше об этом даже и не думать.
NLA
Иногда помогает отключение NLA на сервере. Выяснить причину не получилось, домашние машины все разные.
NTLM
Некоторые клиенты пытаются авторизоваться с использованием NTLMv1. Причины разные, но исправить на клиенте можно так:
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa]
"LmCompatibilityLevel"=dword:00000003
Перезагрузка обязательна.
Если вы
молоды и дерзки
ничего не боитесь, то есть более радикальное решение — отключение Channel Binding на Remote Desktop Gateway
HKLM\Software\Microsoft\Windows NT\CurrentVersion\TerminalServerGateway\Config\Core
Type: REG_DWORD
Name: EnforceChannelBinding
Value: 0 (Decimal)
Делать так не надо. Но мы делали. 
Отключение RDP 8+ в Windows 10
Если ничего не помогает, а идеи кончились, можно воспользоваться недокументированным ключом для даунгрейда протокола RDP до 7 версии.
[HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client]
"RDGClientTransport"=dword:00000001
Сам не делал, и вам не советую. Но кому-то, пишут, что помогает.
DrWeb
Компонент Dr.Web SpIDerGate может запретить подключение. В этом случае возвращается ошибка:
В статистике Dr.Web будет запись:
В комментариях к этой статье со мной связался сотрудник Dr.Web и наша проблема решилась в ближайшем обновлении антивирусных баз.
Если у вас такая же ошибка, лучше обратиться в поддержку.
Как временное решение, можно внести URL вашего RDGW в исключения:
И только если не помогло отключить компонент SpIDer Gate полностью.
Системный прокси
Встретился списанный компьютер из какой-то компании, где в качестве системного прокси был прописан местный TMG, и подключение к RDGW не работало. Это можно исправить так:
netsh winhttp show proxy && netsh winhttp reset proxy
Переключение раскладок клавиатуры
Иногда приезжают лишние раскладки. Можно отключить проброс раскладки с клиента
[HKLM\System\CurrentControlSet\Control\Keyboard Layout]
"IgnoreRemoteKeyboardLayout"=dword:00000001
Проблемы с DPI
Масштабирование приходит с клиентской машины, и если на домашнем ноутбуке стоит 125%, то и на рабочей машине будет так же. На серверах это можно отключить, а на рабочих станциях не нашел как. Но в магазине приложений Windows 10 есть «современный» клиент.
В нем можно настроить DPI:
Как мониторить шлюз с RDGW
Есть счетчик производительности «Шлюз служб терминалов\Текущие подключения», который немного глючит, если нет подключений или сервер долго не перезагружался. Он показывает именно число подключений, но как мы помним, для HTTP+UDP их как минимум два, а может быть и больше. Поэтому это не совсем объективный показатель числа подключений сотрудников.
Есть класс WMI Win32_TSGatewayConnection. Его содержимое соответствует тому, что вы видите в разделе «Наблюдение» шлюза удаленных рабочих столов.
С ним число подключений можно посчитать поточнее:
Get-WmiObject -class "Win32_TSGatewayConnection" -namespace "root\cimv2\TerminalServices"
|?{$_.transportprotocol -ne 2}|select username,connectedresource|sort username|Get-Unique -AsString| measure|select -ExpandProperty count
Just for fun есть утилита Remote Display Analyzer. Бесплатная версия мне ничего полезного не показала, но вдруг кому-то пригодится.
А как же тонкий тюнинг, настройка нескольких десятков параметров сессии?
Здесь уместен принцип Парето: 20% усилий дают 80% результата. Если вы готовы инвестировать ваше время в оставшиеся 20% результата — отлично. Только имейте в виду, что когда вы читаете статью о настройке протокола в Windows 7, то не знаете про какой протокол писал автор — 7, 8 или 8.1. Когда читаете про Windows 10 без указания релиза — проблемы те же. Например, пишут что в свежих билдах Windows 10 кодек AVC/h.264 изменился на RDPGFX_CODECID_AVC444V2, а в Windows Server 2016 остался RDPGFX_CODECID_AVC444.
Из всех таких советов мы используем только две настройки:
- 16 bit цвет, об этом можно почитать в статье MS RDP Performance / Bandwidth Usage
- Отключение сглаживания шрифтов font smoothing:i:0 по статье выше или Performance Tuning Remote Desktop Session Hosts
Сомневаюсь, что они дают какой-то ощутимый результат.
Вот мы и подошли к концу статьи. Хотел покороче, а получилось как всегда. Рад, если кому-то эти советы помогут сэкономить время или улучшить настройку своей инфраструктуры.
Что такое Remote Desktop Gateway
Remote Desktop Gateway — Cервис Windows Server для доступа к ресурсам, у которых нет выхода в интернет, через защищенный канал связи по протоколу HTTPS. В сценарии пользователи из группы Administrators получат доступ к тестовой виртуальной машине с использованием самоподписанного сертификата.
RD Gateway предоставляет множество преимуществ:
- шлюз позволяет удаленным пользователям подключаться к внутренним сетевым ресурсам через Интернет, используя зашифрованное соединение, без необходимости подключения виртуальных частных сетей (VPN);
- шлюз предоставляет комплексную конфигурацию безопасности, которая позволяет контролировать доступ к определенным внутренним сетевым ресурсам;
- шлюз обеспечивает одноточечное RDP-соединение и не позволяет удаленным пользователям получать доступ ко всем внутренним сетевым ресурсам;
- шлюз позволяет подключаться к внутренним сетевым ресурсам, которые размещаются за брандмауэрами в частных сетях и между NAT;
- консоль диспетчера шлюза позволяет настраивать политики авторизации для определения условий, которые должны быть выполнены для удаленных пользователей при подключении к внутренним сетевым ресурсам. Например, можно указать: кто может подключаться к сетевым ресурсам и к каким сетевым ресурсам (группам серверов), должны ли клиентские компьютеры быть членами групп безопасности Active Directory, разрешено ли перенаправление устройства и диска;
- консоль диспетчера шлюза предоставляет инструменты, которые помогут отслеживать состояние шлюза. Используя диспетчер, вы можете указать события (например, неудачные попытки подключения к серверу шлюза служб терминалов), которые вы хотите отслеживать для целей аудита.
- Для подключения через шлюз ваш сервер должен входить в домен Active Directory, настройка шлюза может выполняться на любом сервере в домене от имени администратора домена.
Установка роли
Откройте Диспетчер серверов и выберите пункт Add roles and features.
В качестве типа установки укажите Role-based or feature-based installation.
Выберите ваш сервер из пула.
В следующем окне нужно выбрать Remote Desktop Services.
Далее вы увидите краткую информацию о роли.
Далее добавьте сервис Remote Desktop Gateway.
Для работы этого сервиса необходим IIS и дополнительные административные инструменты, они будут предложены автоматически, если не были установлены ранее.
Добавьте следующие функции.
Установите все выбранные компоненты на VPS с помощью кнопки Install.
Создание политики авторизации подключения и ресурсов
Чтобы открыть Remote Desktop Gateway Manager, в Диспетчере серверов выберите Tools и в открывшемся списке Remote Desktop Services — Remote Desktop Gateway Manager.
Перед вами откроется менеджер шлюза.
Для создания политик авторизации в древовидной структуре откройте RD Gateway Manager → <Имя сервера> → Policies → Connection Authorization Policies. В вертикальном меню Actions справа выберите Create New Policy → Wizard.
В открывшемся окне выберите Create RD CAP and RD RAP (recommended), чтобы с помощью одного процесса настроить обе политики.
Введите удобное имя для политики авторизации подключения.
На следующем шаге выберите наиболее удобный метод аутентификации: пароль или smartcard. Далее добавьте группы пользователей которые смогут подключаться к этому RD Gateway серверу, для это нажмите Add Group.
Выберите нужную группу, например администраторов домена или контроллеры домена. Выполнить поиск можно с помощью кнопки Check Names.
После добавления групп можно переходить к следующему действию.
Выберите устройства и ресурсы удаленной сессии, которые будут доступны клиентам использующие шлюз.
Выберите нужные для вас значения таймаутов: времени простоя и времени работы сессии.
Перепроверьте выбранные настройки.
Далее вы перейдете к настройке политики авторизации ресурсов. Введите удобное имя политики.
Также добавьте группы пользователей, которые смогут подключаться к сетевым ресурсам.
Выберите группу, содержащую серверы, на которых указанные группы пользователей могли бы работать с удаленным рабочим столом. Для этого нажмите Browse.
В этом примере используется встроенная группа под названием Domain Controllers. Вы можете создавать дополнительные группы, содержащие серверы, которые связаны или принадлежат к определенным отделам или сотрудникам. Таким образом, на предыдущих шагах вы можете назначать группы на основе потребностей пользователей и разрешать им доступ только к определенным серверам.
Убедитесь, что добавлена нужная группа.
Если порт по умолчанию удаленного рабочего стола на серверах был изменен, используйте эту страницу для указания порта. В противном случае выберите разрешение подключения только к порту 3389.
Проверьте указанные настройки для политики.
Далее отобразится результат создания политик.
После создания политик менеджер будет выглядеть следующим образом.
Установка SSL-сертификата
Для шлюза удаленного рабочего стола должен быть установлен SSL-сертификат. Чтобы установить SSL-сертификат, щелкните имя сервера удаленного рабочего стола в консоли управления удаленным рабочим столом и выберите View or modify certificate properties.
Возможно 3 способа импорта сертификатов:
- создание самоподписанного сертификата и его импорт;
- импорт ранее загруженного сертификата (самоподписанного или стороннего);
- загрузка стороннего сертификата (например, Comodo) и его импорт;
Выберите подходящий вам способ, в нашем примере мы рассмотрим первый случай с генерацией и импортом самоподписанного сертификата.
Введите имя сертификата и его расположение на сервере. Нажмите OK.
Сертификат будет сгенерирован.
В результате отобразится — кому, кем и до какого числа выдан ssl-сертификат. Нажмите Apply для сохранения изменений.
Теперь самоподписанный SSL-сертификат успешно установлен на TCP-порт 443 (порт SSL по умолчанию).
В целях безопасности рекомендуется изменить порт SSL для шлюза удаленных рабочих столов на другой номер. Обычно компании делают это, чтобы попытаться обмануть хакеров, которые могут ориентироваться на стандартный порт 443.
Чтобы изменить номер порта для шлюза RD, щелкните правой кнопкой мыши имя сервера и выберите свойства в консоли управления удаленным рабочим столом (Action — Properties).
Измените значение HTTP-порта на любое удобное значение и сохраните изменения.
Подтвердите изменения, нажав Yes.
Подключение через шлюз
Для подключения откройте стандартное приложение Windows Подключение к удаленному рабочему столу (mstsc.exe). На вкладке Дополнительно нажмите на кнопку Параметры.
В открывшемся окне выберите Использовать следующие параметры сервера шлюза удаленных рабочих столов. Введите имя сервера в следующем формате и нажмите OK:
rdgateway.<ваш домен>:<порт>
На вкладке Общие в поле Компьютер введите домен, в поле Пользователь имя пользователя и нажмите Подключить. При необходимости можете сохранить параметры входа.
Примечание: пользователь должен иметь права подключения через шлюз, которые были настроены ранее.
Введите пароль от учетной записи.
В результате будет произведено подключение к удаленному рабочему столу через шлюз RD Gateway.
The modern work environment is no longer confined to the traditional office space. Employees need seamless and secure access to internal resources when working from home, traveling, or in satellite offices. Remote access solutions bridge the geographical gap, enabling users to connect to the corporate network from virtually anywhere.
While various remote access solutions exist, Microsoft’s Remote Desktop Gateway (RD Gateway) is key. But what is Remote Desktop Gateway server and how does it secure remote access to corporate networks?
In this guide, we will help you understand RD Gateway, offer a step-by-step approach to on how to configure gateway for remote desktops, provide an overview of security considerations, and discuss how best to address common issues.
What is RD Gateway?
RD Gateway, Microsoft Remote Desktop Gateway, or simply Remote Desktop Gateway, is a role service in Windows Server that enables authorized remote users to connect to resources within an internal corporate network over a secure channel. It acts as an intermediary between remote desktop clients and the target internal network, ensuring that connections are authenticated, encrypted, and routed through a secure tunnel.
It acts as a gateway between the public internet and the internal network, shielding it against unauthorized access.
Enhance RDG by utilizing NinjaOne Remote Access to create a secure and efficient remote access infrastructure.
Start a free trial today
Reasons to use Remote Desktop Gateway
Organizations often ask how secure is Remote Desktop Gateway (RD Gateway). There are several reasons an organization may elect to use RD Gateway to manage remote server connectivity. These include:
- Securing access to internal resources: RD Gateway ensures secure access by authenticating users and routing connections through a common location. This is particularly crucial when dealing with sensitive information or compliance requirements.
- Encryption and data protection: To further address the question of how secure is Remote Desktop Gateway, RD Gateway encrypts data transmitted using the Remote Desktop Protocol (RDP) with HTTPS, preventing unauthorized interception and ensuring the confidentiality and integrity of information transmitted between the client and the internal network.
- Centralized access control and auditing: Administrators can establish centralized access controls, defining user permissions and groups. Additionally, RD Gateway provides robust auditing features, allowing organizations to monitor and track user activities for compliance and security purposes.
- Simplified remote desktop configuration: RD Gateway simplifies the configuration of remote desktop connections by mediating between remote clients and internal resources. This eliminates the need for complex networking setups and facilitates a streamlined user experience.
- Enhanced user experience and productivity: By providing a secure and seamless connection to internal resources, RD Gateway enhances user experience, promotes productivity among remote employees, and reduces potential connectivity issues.
How Does Remote Desktop Gateway work?
Microsoft Remote Desktop Gateway is an intermediary, mediating connections between remote desktop clients and internal resources. It authenticates users, ensures secure data transmission, and facilitates the seamless flow of information between the remote client and the internal network.
Employing a two-step authentication ensures that users are first authenticated through a secure login process. Once authenticated, the RD Gateway verifies the user’s authorization to access the requested internal resources.
The HTTPS protocol tunnels connections to the internal network through a secure channel. This ensures that data transmitted between the client and the internal network is encrypted, safeguarding it from potential eavesdropping or tampering.
RD Gateway is compatible with many remote desktop clients, including the native Windows Remote Desktop Connection client, third-party applications, and even mobile devices. RD Gateway supports load balancing for organizations with high traffic volumes to distribute incoming connections across multiple servers, ensuring optimal performance and availability.
Installing RD Gateway
Before setting up RD Gateway, there are several steps that you need to take into consideration first:
Windows server: Ensure you have a Windows Server operating system installed, such as Windows Server 2022 or Windows Server 2019. This provides the foundation for running the RD Gateway role.
Network infrastructure:
- DNS: It is always essential that your DNS records are correctly configured, making them accessible within your network. Under this operation, you are tasked with ensuring that the DNS server can resolve the server’s hostname and IP address.
- Firewall rules: Open the necessary firewall ports on the Remote Desktop Gateway server and any intervening firewalls to allow traffic to and from the server. This typically includes TCP port 443 for HTTPS, which is used for secure communication. Port 3389 is generally used for RDP traffic but is not necessary to open for RD Gateway operations, as the gateway encapsulates RDP traffic within HTTPS.
Active Directory: Users must have the appropriate permissions to access the Remote Desktop Gateway server and its resources. That’s why one of the prerequisites is having a domain environment with Active Directory for user authentication and authorization.
SSL certificate: Securing communication between the Remote Desktop Gateway server and clients is done through having a valid SSL certificate from a trusted authority. This ensures data confidentiality and integrity.
Installation
- Open server manager: Launch Server Manager on your Windows Server. This is the central management tool for Windows Server.
- Add Roles and Features: Navigate to the “Manage” menu and select “Add Roles and Features.” This wizard will guide you through adding the necessary roles and features to your server.
- Select RD Gateway: Choose “Role-Based or Feature-Based Installation” and select the appropriate server. In the “Select server roles” section, locate and select “Remote Desktop Services” and then “Remote Desktop Gateway.” Follow the on-screen prompts to complete the installation.
Install SSL Certificate
- Obtain certificate: An SSL certificate authenticates the Remote Desktop Gateway server to clients and encrypts communication. Therefore, it’s essential to only acquire a valid SSL certificate from a trusted certificate authority.
- Import certificate: Use the Microsoft Management Console (MMC) to import the certificate into the local computer’s personal store. This makes the certificate available for use by the RD Gateway.
- Configure RD Gateway: Open the RD Gateway Manager, navigate to the server node, and select the “Properties” option. Under the “SSL Certificate” tab, select the installed SSL certificate to associate it with the RD Gateway server.
Setting Up RD Gateway
Configure Server:
- Network settings: The Remote Desktop Gateway server’s network settings, including IP address, subnet mask, and default gateway, must be correct. This step is important to enable the server to communicate with other devices on the network.
- Define access rules: A Connection Authorization Policy (CAP) lets you control who can access the remote desktop environment. You can employ this by creating CAPs to specify users or groups who can connect to the Remote Desktop Gateway.
Creating Connection Authorization Policy (CAP)
Create VPN connections: VPN connections provide a secure tunnel for traffic to reach the RD Gateway. Sometimes, you are also required to create Virtual Private Network (VPN) connections to cater to remote locations or networks that need access to the RD Gateway.
DNS settings: Verify that the server can resolve DNS names correctly. This is essential for accessing network resources.
Set conditions: Preset conditions help you implement additional security measures and restrictions. Define conditions for access, such as specific IP addresses, time periods, or device types.
Creating Resource Authorization Policy (RAP)
Grant access: Creating a Resource Authorization Policy (RAP) lets you control which resources are accessible to different users. Create RAPs to grant users or groups access to specific resources within the internal network.
Define permissions: Specify the level of access (e.g., full control, read-only) for each resource. This determines what actions users can perform on the resources.
RD Gateway configuration best practices
Once RD Gateway has been installed, several configuration steps are required to align with remote access best practices:
Establish Remote Desktop Gateway policies
Define Remote Desktop Gateway policies to control user access, connection parameters, and security settings. Launch the RD Gateway Manager and navigate to the “Policies” node. Right-click, and select “Create New Authorization Policies.” Follow the prompts to define access policies based on user groups, resource authorization, and connection parameters.
Define user access permissions and groups
Configure user access permissions and groups to determine who can connect to RD Gateway and the internal resources. Navigate to “Server Manager” and select “Remote Desktop Services” from the left-hand menu. Under the “Collections” node, select the collection you want to configure. In the “Tasks” pane, click on “Edit properties,” and under the “User Groups” tab, define the user groups allowed to connect.
Customize RD Gateway properties
Customize RD Gateway properties to align with your organization’s requirements and security policies. Launch the RD Gateway Manager, navigate to the server node, right-click, and select “Properties.” Adjust settings such as timeout periods, device redirection, and logging options to match your organization’s needs.
Troubleshooting common configuration issues
If errors or difficulties arise during or after the setup process, check the Event Viewer for any RD Gateway-related events or errors. This can provide insights into potential issues.
A common RD Gateway, resulting in a total service outage, is related to SSL certificate expiration. Regularly monitor the expiry date of your SSL certificate and configure reminders to allow sufficient time for a new certificate to be secured and installed before the existing one expires to prevent connectivity issues.
Boost the security and efficiency of your remote access setup by integrating NinjaOne Remote Access with RDG.
Watch a demo
Embrace the full potential of RD Gateway
Setting up a Remote Desktop Gateway is crucial in establishing a secure and efficient remote access infrastructure. By following the guidance offered above to achieve proper setup, maintenance, and operation of RD Gateway as a reliable remote access mechanism, organizations can embrace its full potential.
RD Gateway is pivotal in ensuring encrypted and authenticated connections, allowing organizations to embrace remote work without compromising security.
NinjaOne Remote is NinjaOne’s remote access tool integrated directly into NinjaOne RMM. Built from the ground up, it offers a strong and secure RDP tool using our own gateway. Watch a demo or sign up for a free trial to see Ninja Remote in action.
