Being able to access via RDP (Remote Desktop Protocol) or via SSH (Secure SHel) to virtual machines present in Azure is a basic requirement for system administrators. Direct exposure of these protocols on Intenet is definitely a practice to be avoided as a high risk security. This article shows the different methodologies that can be taken to gain remote access to the systems present on Azure and the characteristics of each of it.
Recently Microsoft has released a security update rated critical and directed to resolution of the vulnerability CVE-2019-0708 identified on the Remote Desktop service for different operating systems. The vulnerability allows code execution via RDP protocol allowing you to take full control of the remote system. This vulnerability is taken as an example to highlight what is actually risky to publish on the Internet these access protocols. For this reason you should consider adopting one of the solutions below for even more security.
To have an easy administrative access to the Azure Virtual Network you can enable a Point-to-Site VPN (P2S). Through the VPN P2S can establish connectivity from one location to the Azure environment, easily and securely. When the VPN connection is established you will have the ability to remotely access to systems in Azure. For more information on VPN P2S I invite you to read the article Azure Networking: Point-to-Site VPN access and what's new. By adopting this methodology should take into consideration the maximum number of possible connections for single Azure VPN Gateway.
Just-in-Time VM Access
It is a feature available in Azure Security Center Standard Tier, allowing you to apply the necessary configurations to the Network Security Group (NSG) and more recently to Azure Firewall to allow administrative access to systems, properly filtered for source IP and for a certain period of time. Just-in-Time VM Access allows to perform the configurations needed to access remotely to systems quickly, targeted and only for a very specific time period. Without the use of this feature you would need to manually create the appropriate rules within the NSG or Azure Firewall (NAT Rule), remember to remove them when no longer needed.
A scenario that is used in some situations is the presence of a virtual machine (Jumpbox) accessible remotely and dislocated in a suitably isolated subnet, that is used to access several other systems in communication with that subnet. In a network architecture that reflects the hub-and-spoke topology, typically this system is positioned in the hub network, but it is recommended to apply filters to make sure that this system is only accessible from certain public IP addresses, without exposing it directly on the Internet. In this scenario you should take into consideration that you will have a maximum of two remote connections simultaneously for single JumpBox.
It is a PaaS service, recently announced by Microsoft in preview, offering a safe and reliable SSH and RDP access to virtual machines, directly through the Azure portal. The provisioning of Azure Bastion service is carried out within a Virtual Network of Azure and supports access to all the virtual machines on it attested, without exposing the public IP addresses.
For more details on this please read the article Azure Bastion: a new security model created by Silvio Di Benedetto.
Azure Bastion is a paid service, to get the details on the costs you can access the page Azure Bastion pricing.
At the time it should take into account that Azure Bastion and Just-in-Time VM Access can not be used to access the same systems.
A very valid solution in terms of security would be to implement a Remote Desktop Services environment in Azure, which includes the use of the role of Remote Desktop Gateway, specially designed to be directly exposed to the Internet (TCP port 443). With this component you can encapsulate RDP traffic in an HTTP over TLS / SSL tunnel. The Remote Desktop Gateway also supports Multi-Factor Authentication that allows to further increase the level of security for remote access to resources. A similar solution is also available in Citrix environment. In this area you will need to consider, in addition to the costs associated with Azure components, also the license costs.
There are several possibilities for providing secure remote access to machines in the Azure environment. The new Azure Bastion service is a safe and simple method, but that needs to be expanded with more features, the most important is certainly support for Virtual Network in peering and for multi-factor authentication. These features probably will be available in the official release time. Waiting to use Azure Bastion in a production environment you can use the other methods listed, thus avoiding having to expose unprotected systems to the Internet.