How can you keep your entire Azure Virtual Network easily accessible and secure at the same time? Many an IT professional has had sleepless nights trying to figure it out. Now, let us help you avoid them!

Luckily there are some great solutions like Just-In-Time VM Access without risking port scanning and brute force attacks. We will cover the Azure VM connectivity options – including the new Azure Bastion – here.


Contact us


The Azure cloud services have helped companies around the world move from on premises servers to Virtual Machines available at a moments notice. This has undoubtedly made it possible for a lot of small & medium businesses to scale fast and saved established companies fortunes. But with new solutions come new challenges. Hackers are always searching for vulnerabilities via ports connected to public IP addresses. So when you need to connect to your Azure Virtual Machines to manage them, there are a range of security and connectivity issues.

Remote Desktop Protocol (RDP) is well-known and commonly used to access remote computers and servers. This lets IT administrators support a huge organization from the comforts of their own desk. Microsoft developed RDP and includes two administrator accounts for simultaneous RDP onto a server in Windows Server. For more users you can add CALs (RDS Client Access Licenses).

There are several challenges facing the IT professionals who need to expose their virtual machines to the public internet by opening ports (RDP/SSH):

1) Brute force attacks target management ports as a means to gain access to a VM
2) DDoS attacks by flooding the bandwidth or resources of a targeted system
3) Port scanning – finding an active port and discovering exploitable communication channels

So let’s look at the different options for connecting to your VMs with RDP and how you can mitigate these risks

RDP using a Private IP address across a Site to Site VPN

The ideal form of RDP connection is RDP across a Site to Site VPN connection. This keeps your communication with the Virtual Machine off the public internet granting protection against port scanning, brute force and DdoS attacks. With a VPN gateway from the Azure network to the on premises network Azure VMs can be RDP’ed using a private IP address – protected from the prying eyes of the public internet. 

The public IP address can be removed all together if you don’t need it. If you do need to use it for something, the RDP port (usually 3389) will be closed. This is an effective and seamless approach to connect to Azure VM without public IP addresses, reducing the threat of attacks. 

However, if you don’t have a Site to Site VPN to your Azure network, there are other options.

Lock down RDP to a source IP or IP Range

The default RDP port – 3389 – allows RDP connection from any IP in the world. When enabled it is therefore a security risk. You can mitigate this by restricting RDP access to a specified source IP address or range with Azure NSG’s (Network Security Groups).

Every Virtual Machine will have its own NSG when deployed through Azure. You should apply these two Inbound Port rules:

  • Allowing RDP from a specific IP address or range
  • Denying all other RDP traffic

Pros: This effectively reduces outside threats by only allowing the specified on premises machines to RDP into the Azure Virtual Machines.

Cons: The port is still visible on the internet. This method is best suited for smaller organizations and also involves management of Network Security Group Port rules

Just-in-time VM access:

Brute force attacks can take days and even weeks to complete. An astounding number of attempts need to be made to connect through the RDP/SSH ports. So if you only have the port open when you need it, you reduce the vulnerability. Just-in-time (JIT) VM access only opens the ports when you need them and locks them down to your IP address / range. After you have finished what you were doing on the VM, it closes the port again.

You can enable JIT easily from Azure Security Center, configure it through an Azure Virtual Machine blade or configure a JIT policy on a VM programmatically.

Pros: Reduces the risk of succesfull brute force attacks as the port is only open when you need it

Cons: You still need to open port 3389 to public internet leaving you vulnerable within the allotted time frame.

Public Load Balancer with Network Address Translation (NAT)

A Public Load Balancer has a public IP address, and a Network Address Translation (NAT) rule forwards traffic from a specific port of the front-end IP address to a specific port of a back-end VM on its Private IP. So, the VM you want to access with RDP doesn’t have to have a Public IP and its private IP isn’t visible.

Pros: Minimizes the number of Azure Public IP addresses, obfuscates management ports of virtual machines, load balances traffic across the virtual machines configured under it

Cons: This approach has certain limitations so it may not be suitable in some scenarios. The load-balancing rules and inbound NAT rules support TCP and UDP but not other IP protocols like ICMP. The load balancer doesn’t terminate, respond or interact with the payload of a UDP or TCP flow.

Provision a Jumphost VM

Rather than exposing all your virtual machines to public internet, you can use the Jumphost solution. This creates a single VM – called the Jumphost – in Azure with RDP connection to the internet. From this box you connect to your other VMs in your virtual network.

An NSG can be used to restrict the IP addresses that can communicate with the Jumphost. Monitoring and logging can also only be done on this one VM. You can easily turn it off to stop all RDP when needed.

Jumphosts are easy to deploy and greatly increase security on the overall Azure VM infrastructure maintenance. You can find CIS Hardened images ready for easy deployment and management in the Microsoft Azure marketplace.

Pros: Access your VMs through one locked down, hardened jumphost. Your VMs don’t need Public IPs.

Cons: Jumphost still involves opening one VM to public internet without eliminating outside threats completely. The additional cost of one VM, configuration, ACLs, monitoring and auditing can make this a costly solution.

Azure Bastion – a jump host PaaS service

In late 2019 Microsoft released Azure Bastion into General Availability. It is a new fully platform-managed PaaS service which provides secure and seamless RDP/SSH connectivity to your virtual machines directly in the Azure portal over SSL.

Azure Bastion provisions directly in your Azure Virtual Network acting like a jump server as-a-service. You don’t need Public IPs to access your VMs over RDP/SSH. 

Additionally, Azure Bastion provides integrated connectivity using RDP/SSH directly from your browser and the Azure portal experience. You don’t need an additional client, agent, or piece of software.

Deployment of Azure Bastion is per virtual network, thus, once deployed in a virtual network, it is available to all VMs in the virtual network.

Bastion host servers are designed and configured to withstand attacks. Azure Bastion is also reinforced by automatic patching, handled by Microsoft, to best guard customers against zero-day exploits.

Pros: You don’t need public IP addresses on your virtual machines, get the benefits of a jumphost without the overhead, RDP and SSH directly in Azure portal.

Cons: The disadvantages of Azure Bastion are hard to find. This PaaS Service is not yet available worldwide, but can currently be used in 29 regions. Please ask one of our consultants for the current availability outside the UK, if this is relevant to your business.

Overall Azure Bastion is the ideal solution that IT professionals have been waiting for. It provides an easy and fool proof solution to eliminate outside threats with minimal maintenance overhead. You get all the benefits of RDP but connect to Azure VM without Remote Desktop client.

Future capabilities and features of Azure Bastion

Microsoft is still developing Azure Bastion to meet user needs. Along with the expansion to all regions the following updates are expected:

  1. Azure Active Directory integration and Azure MFA (Multi-Factor Authentication)
  2. Extending two-factor authentication to RDP/SSH connections
  3. Added support for native RDP/SSH clients so that you can use your favourite client applications to securely connect to Azure Virtual Machines using Azure Bastion
  4. Enhanced auditing experience for RDP sessions with full session video recording.

Want to know more? Get in touch

Let's Talk

    Enter your details below and we'll be in touch soon:

    Want to keep in touch?

    If you’ve enjoyed reading this blog, then sign up to receive our monthly newsletter where we share new blogs, technical updates, product news, case studies, company updates, Microsoft and Cloud news.

    We promise that we won’t share your email address with other business or parties, and will keep your details safe. You can choose to unsubscribe at any time.

    Published On: March 9th, 2020 / Categories: Azure / Tags: /

    Contact our Microsoft specialists

    Phone or email us to find out more – or book a free, no-obligation call with our technical consultants using the contact form.

    “It’s great to work with the Compete366 team, the team members are really knowledgeable, helpful and responsive. No question is too difficult for them. They have really helped us to manage our Azure costs and ensure we have the right environment. When we bring a new customer on-board we can scale up immediately via the Azure portal and quickly make environments available to our customers.”

    “We also find that there’s never a heavy sales pitch from them – they are technically focused and recommend what’s right for us.”

    Paul Coyne, Rusada

    “We had great support from the Compete366 AVD expert, who was really helpful, and guided me through options to tackle issues that arose.”

    “The great thing about our AVD set up is that we have a custom set up for each project which Compete366 showed me how to do. And with the scalability and flexibility of AVD – we can meet clients’ expectations and get project users up and running more quickly.”

    Amir Dangol, Senior IT Manager, Integrity

    “We were immediately impressed with the advice that the Compete366 specialists in Azure Architecture were able to provide. This was all new to us and we really needed some external expertise that we could use to get our questions answered. The beauty of working with Compete366 is that we transferred our Azure consumption to them, and at the same time received all of their advice and guidance free of charge.”

    Tim Entwistle, Head of Software Development, Herrco

    “Working with Compete366 has been like extending our own team – they are extremely and easy to work with. Right from the outset, it was clear what was on offer – everything was presented to us in a straightforward and uncomplicated way. They also provided just the right level of challenge to our developers and saved us time and money by suggesting better ways to implement our infrastructure.”

    Oliver Mackereth, Project Director, Hanse

    “Compete366 were able to help us leverage some useful contacts in Microsoft. We really value the expert advice and guidance that they have offered us in setting up a highly scalable infrastructure. We are also setting in place a regular monthly meeting which will allow us to further refine our architecture and ensure we keep on track as our requirements grow and change.”

    Matt Brocklehurst, Technical Director - AWOL Adventure

    “I have been delighted with the migration, where my team worked very hard, supported by expert advice from Compete366, and achieved everything in the timescale we had set out. Compete 366 made sure that we didn’t make any expensive mistakes, and guided us through the process”

    Darrell Cann, Managing Director, APEX
    Jon Milward
    Thank you for your message. It has been sent.
    There was an error trying to send your message. Please try again later.

    By submitting your details, you agree to be contacted.