{"id":38880,"date":"2020-04-12T09:01:36","date_gmt":"2020-04-12T16:01:36","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/premier-developer\/?p=38880"},"modified":"2020-03-26T09:34:46","modified_gmt":"2020-03-26T16:34:46","slug":"azure-bastion-secure-access-to-azure-vms","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/premier-developer\/azure-bastion-secure-access-to-azure-vms\/","title":{"rendered":"AZURE BASTION \u2013 SECURE ACCESS to AZURE VMS"},"content":{"rendered":"<p>App Dev Manager <span style=\"color: #000122;\"><a href=\"https:\/\/www.linkedin.com\/in\/vijethamallappa\/\">Vijetha Marinagammanava<\/a>r<\/span> spotlights secure access to Azure VMs using Bastion.<\/p>\n<hr \/>\n<p>In this blog post, I am going to introduce you to Azure Bastion and show how to create your first Azure Bastion host.<\/p>\n<p>Azure Bastion is a new fully platform-managed PaaS service. It provides secure and seamless RDP\/SSH connectivity to your virtual machines directly in the Azure portal over SSL. When you connect via Azure Bastion, your virtual machines do not need a public IP address.<\/p>\n<p>Customers connecting to VM\u2019s on private networks face security risks all the time. Exposing network assets to the public internet through Remote Desktop Protocol and Secure Shell increases the security perimeter, making it harder to manage and protect them. Azure Bastion is provisioned directly in a customer&#8217;s Virtual Network and supports all VMs in their VNet using SSL, without any exposure through public IP addresses.<\/p>\n<p>Azure Bastion service is generally available now. This blog will provide a quick introduction of the service and steps to enroll the service in the environment to reach Azure VMs (Windows) over a secure way.<\/p>\n<p>The availability of Azure Bastion is updated on Microsoft documentation. Please refer to <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/bastion-overview\">https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/bastion-overview<\/a> for region availability and pricing.<\/p>\n<p><img decoding=\"async\" width=\"909\" height=\"605\" class=\"wp-image-38881\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/azure-bastion-architecture-from-ms-docs.png\" alt=\"Azure Bastion architecture from MS docs\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/azure-bastion-architecture-from-ms-docs.png 909w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/azure-bastion-architecture-from-ms-docs-300x200.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/azure-bastion-architecture-from-ms-docs-768x511.png 768w\" sizes=\"(max-width: 909px) 100vw, 909px\" \/><strong>Azure Bastion architecture<\/strong><\/p>\n<p><strong>Key features<\/strong><\/p>\n<ol>\n<li>RDP and SSH directly in the portal<\/li>\n<li>Remote session over SSL for SSH\/RDP<\/li>\n<li>No public IP needed on the Azure VM<\/li>\n<li>No need for an Agent inside the Azure VM<\/li>\n<li>Browser support for Edge and Google Chrome<\/li>\n<\/ol>\n<p><strong>Create an Azure Bastion Resource<\/strong><\/p>\n<ol>\n<li>There are two ways to deploy an Azure Bastion Host over the Portal or via the Azure VM Blade.<\/li>\n<li>Login to your Azure portal and click \u201c<strong>Create a new resource<\/strong>\u201d.<img decoding=\"async\" width=\"925\" height=\"670\" class=\"wp-image-38882\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-68.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-68.png 925w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-68-300x217.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-68-768x556.png 768w\" sizes=\"(max-width: 925px) 100vw, 925px\" \/><\/li>\n<li>Then search for\u00a0<strong>Bastion<\/strong>. Click\u00a0<strong>Create<\/strong>\u00a0to start the deployment wizard.<img decoding=\"async\" width=\"2089\" height=\"807\" class=\"wp-image-38883\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69.png 2089w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69-300x116.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69-1024x396.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69-768x297.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69-1536x593.png 1536w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-69-2048x791.png 2048w\" sizes=\"(max-width: 2089px) 100vw, 2089px\" \/><\/li>\n<li>Now choose a\u00a0<strong>resource group\u00a0<\/strong>to host the bastion resource, give it a\u00a0<strong>name\u00a0<\/strong>and pick a<strong>\u00a0region (east-us for the demo)<\/strong>. The Azure Bastion is deployed in a VNET, there is one-to-one relation between your VNETs, and your Azure bastion resources.<\/li>\n<li>We are using newly created VNET\u00a0\u201c<strong>vnet-demo\u201d<\/strong>\u00a0that is hosted for demo purpose. Please note that the wizard prompts to create a subnet in that VNET with an exact name of\u00a0<strong>AzureBastionSubnet<\/strong>\u00a0and with an IP prefix of at least<strong>\u00a0\/27.<\/strong> <img decoding=\"async\" width=\"1553\" height=\"1454\" class=\"wp-image-38884\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-70.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-70.png 1553w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-70-300x281.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-70-1024x959.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-70-768x719.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-70-1536x1438.png 1536w\" sizes=\"(max-width: 1553px) 100vw, 1553px\" \/><\/li>\n<li>Create Subnet per requirements<img decoding=\"async\" width=\"1300\" height=\"1444\" class=\"wp-image-38885\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-71.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-71.png 1300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-71-270x300.png 270w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-71-922x1024.png 922w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-71-768x853.png 768w\" sizes=\"(max-width: 1300px) 100vw, 1300px\" \/><\/li>\n<li>Go back to the Azure Bastion deployment wizard and select the vnet and newly created subnet.<\/li>\n<li>Azure bastion host requires creating a public IP address that will be used for SSL connectivity only from the internet. Now this IP is not going to be attached to your VMs in anyway.\nAzure automatically assigns a public IP to the service and generates a name that corresponds to the VNET declaration.<img decoding=\"async\" width=\"1522\" height=\"1558\" class=\"wp-image-38886\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-72.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-72.png 1522w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-72-293x300.png 293w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-72-1000x1024.png 1000w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-72-768x786.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-72-1501x1536.png 1501w\" sizes=\"(max-width: 1522px) 100vw, 1522px\" \/><\/li>\n<li>Tagging: Don\u00b4t forget to assign tags for the service and all other resources, this helps you to get a well-defined Azure infrastructure.<img decoding=\"async\" width=\"1580\" height=\"1559\" class=\"wp-image-38887\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-73.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-73.png 1580w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-73-300x296.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-73-1024x1010.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-73-768x758.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-73-1536x1516.png 1536w\" sizes=\"(max-width: 1580px) 100vw, 1580px\" \/><\/li>\n<li>Click \u201cReview + create \u201c. The service will be provisioned in your VNET.<\/li>\n<li>Connect to a virtual machine: Select they virtual machine inside \u201cvnet-demo\u201d VNET.<\/li>\n<li>Click \u201c<strong>Connect<\/strong>\u201d and you will see 3 options \u2013 RDP, SSH and Bastion.\nSelect \u201c<strong>Bastion<\/strong>\u201d.<img decoding=\"async\" width=\"2099\" height=\"763\" class=\"wp-image-38888\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74.png 2099w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74-300x109.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74-1024x372.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74-768x279.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74-1536x558.png 1536w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-74-2048x744.png 2048w\" sizes=\"(max-width: 2099px) 100vw, 2099px\" \/><\/li>\n<li>Enter the VM user credentials to connect to the VM and hit \u201c<strong>Connect<\/strong>\u201d<img decoding=\"async\" width=\"1398\" height=\"646\" class=\"wp-image-38889\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-75.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-75.png 1398w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-75-300x139.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-75-1024x473.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-75-768x355.png 768w\" sizes=\"(max-width: 1398px) 100vw, 1398px\" \/>\n<img decoding=\"async\" width=\"1657\" height=\"871\" class=\"wp-image-38890\" src=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-76.png\" srcset=\"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-76.png 1657w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-76-300x158.png 300w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-76-1024x538.png 1024w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-76-768x404.png 768w, https:\/\/devblogs.microsoft.com\/premier-developer\/wp-content\/uploads\/sites\/31\/2020\/03\/word-image-76-1536x807.png 1536w\" sizes=\"(max-width: 1657px) 100vw, 1657px\" \/><\/li>\n<\/ol>\n<p><strong>Security<\/strong><\/p>\n<p>Azure Bastion is a fully managed service by Microsoft and Microsoft hardens the service by default, but hardening to secure the Bastion host we should harden the subnet and use an NSG.<\/p>\n<p>Create an NSG and define the following rules to the NSG,<\/p>\n<ul>\n<li>Allow\u00a0<strong>443\u00a0<\/strong>from service tag Internet<\/li>\n<li>Allow any traffic from a service tag called\u00a0<strong>AzureCloud<\/strong><\/li>\n<li>Allow any traffic from a service tag\u00a0<strong>called Gateway manager.<\/strong><\/li>\n<\/ul>\n<p><strong>References<\/strong><\/p>\n<p>You can learn more about Azure Bastion by referring to below mentioned Microsoft Documentation<\/p>\n<p><a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/azure-bastion\/#overview\">https:\/\/azure.microsoft.com\/en-us\/services\/azure-bastion\/#overview<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/bastion-overview\">https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/bastion-overview<\/a><\/p>\n<p><a href=\"https:\/\/azure.microsoft.com\/en-us\/support\/legal\/sla\/azure-bastion\/v1_0\/\">https:\/\/azure.microsoft.com\/en-us\/support\/legal\/sla\/azure-bastion\/v1_0\/<\/a><\/p>\n<p><a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/bastion-faq\">https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/bastion-faq<\/a><\/p>\n<p><a href=\"https:\/\/azure.microsoft.com\/en-us\/updates\/azure-bastion-is-now-available-in-20-new-regions\/\">https:\/\/azure.microsoft.com\/en-us\/updates\/azure-bastion-is-now-available-in-20-new-regions\/<\/a><\/p>\n<p><a href=\"https:\/\/azure.microsoft.com\/en-us\/pricing\/details\/azure-bastion\/\">https:\/\/azure.microsoft.com\/en-us\/pricing\/details\/azure-bastion\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Azure Bastion is a new fully platform-managed PaaS service. It provides secure and seamless RDP\/SSH connectivity to your virtual machines directly in the Azure portal over SSL. <\/p>\n","protected":false},"author":582,"featured_media":38891,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[25],"tags":[24,9499,9500,28,3],"class_list":["post-38880","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-azure","tag-azure","tag-bastion","tag-rdp","tag-ssh","tag-team"],"acf":[],"blog_post_summary":"<p>Azure Bastion is a new fully platform-managed PaaS service. It provides secure and seamless RDP\/SSH connectivity to your virtual machines directly in the Azure portal over SSL. <\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38880","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/users\/582"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/comments?post=38880"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/posts\/38880\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media\/38891"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/media?parent=38880"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/categories?post=38880"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/premier-developer\/wp-json\/wp\/v2\/tags?post=38880"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}