Azure NSG rules for Azure Bastion

Aaron Krytus 1 Reputation point
2022-09-08T13:26:50.883+00:00

I am looking for the outbound ports from the VM subnet required for Azure Bastion service to function.

I have found this MS Article, but this only applies to the NSG applied to the Bastion subnet.

I have a rule [4096]: DenyAllOutbound traffic the prevents all internet and internal vnet traffic. This supersedes the default built in rules and prevents the Bastion service from working properly. I have added a rule to allow all traffic to the Bastion Subnet, but it also requires some type of traffic to the internet. I tested 3389, 443, and 80 with no luck.
238999-nsg.png

What ports are required to go out to the internet to make Bastion work properly?

Azure Bastion
Azure Bastion
An Azure service that provides private and fully managed Remote Desktop Protocol (RDP) and Secure Shell (SSH) access to virtual machines.
247 questions
{count} votes

1 answer

Sort by: Most helpful
  1. KapilAnanth-MSFT 39,461 Reputation points Microsoft Employee
    2022-09-09T04:21:53.48+00:00

    Hi @Aaron Krytus ,

    Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
    I understand that you would like to understand more about NSG requirements for Azure Bastion Subnet.

    I take it that the NSG you have shared is applied to the Bastion VNet

    • I see you have allowed Inbound traffic for Bastion subnet already
    • You can follow this document which clearly describes the NSG requirements (Which you have described)
    • https://video2.skills-academy.com/en-us/azure/bastion/bastion-nsg?source=recommendations
    • You should allow outbound traffic from Bastion Vnet to the target VM/VM's subnet (I see you had already done this)
    • Along with this, you must allow traffic on the destination VMs from the Bastion subnet

    Inbound Rules

    239239-image.png

    Outbound Rules

    239341-image.png

    Please feel free to let us know should you require more details.

    Cheers,
    Kapil

    ----------------------------------------------------------------------------------------------------------------

    Please don’t forget to close the thread by clicking "Accept the answer" wherever the information provided helps you, as this can be beneficial to other community members.