{"id":2569,"date":"2021-12-16T15:31:01","date_gmt":"2021-12-16T15:31:01","guid":{"rendered":"https:\/\/modern-workplace.uk\/?p=2569"},"modified":"2021-12-16T15:34:05","modified_gmt":"2021-12-16T15:34:05","slug":"teams-virtual-sbc-closing-azure-network-ports-warnings-for-azureloadbalancer-and-virtualnetwork-2-2-2-2-3-2-3-2-2-2-2-2-3-2-2-2","status":"publish","type":"post","link":"https:\/\/modern-workplace.uk\/?p=2569","title":{"rendered":"Microsoft Azure &#8211; Virtual Machine &#8211; Connect to Bastion Using RDP (No Port TCP 3389 Required)"},"content":{"rendered":"\n<p class=\"has-large-font-size wp-block-paragraph\">If you have deployed Virtual Machines (VMs) in Azure, you are probably using Bastion as a secure access tool.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">Azure Bastion provides secure RDP and SSH connectivity to all of the VMs in the virtual network in which it is provisioned.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">However, to connect via Azure Bastion you have to perform a series of steps inside the Azure Portal.<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">To make things easier (without lowering security) Microsoft has made available a method to access from your native client, i.e. SSH or Remote Desktop Protocol (RDP) client<\/p>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><strong><span class=\"has-inline-color has-vivid-green-cyan-color\">Pre-Requirements<\/span><\/strong><\/p>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li>You have to deploy Bastion<\/li><\/ul>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li>You have to install the <span class=\"has-inline-color has-luminous-vivid-amber-color\">Azure CLI<\/span> ( <a href=\"https:\/\/docs.microsoft.com\/en-us\/cli\/azure\/install-azure-cli-windows?tabs=azure-cli\" data-type=\"URL\" data-id=\"https:\/\/docs.microsoft.com\/en-us\/cli\/azure\/install-azure-cli-windows?tabs=azure-cli\">Install Azure CLI on Windows<\/a> ) (or use <span class=\"has-inline-color has-luminous-vivid-amber-color\">Azure Cloud Shell<\/span>)<\/li><\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\"><span class=\"has-inline-color has-vivid-green-cyan-color\"><strong>Configuration and Connection<\/strong><\/span><\/p>\n\n\n\n<ol class=\"has-large-font-size wp-block-list\"><li>From the Azure Portal open the Bastion Resource<\/li><\/ol>\n\n\n\n<figure class=\"wp-block-gallery columns-1 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"434\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource-1024x434.jpg\" alt=\"\" data-id=\"2570\" data-full-url=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource.jpg\" data-link=\"https:\/\/modern-workplace.uk\/?attachment_id=2570\" class=\"wp-image-2570\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource-1024x434.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource-300x127.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource-768x326.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource-1536x651.jpg 1536w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Resource.jpg 1708w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure><\/li><\/ul><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">2. Select <span class=\"has-inline-color has-vivid-cyan-blue-color\">Configuration<\/span><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Configuration.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Configuration-1024x560.jpg\" alt=\"\" class=\"wp-image-2571\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Configuration-1024x560.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Configuration-300x164.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Configuration-768x420.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_Configuration.jpg 1081w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">3. Check that the SKU is <span class=\"has-inline-color has-vivid-cyan-blue-color\">Standard<\/span> and that the N<span class=\"has-inline-color has-vivid-cyan-blue-color\">ative Client Support<\/span> is flagged<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"270\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License-1024x270.jpg\" alt=\"\" class=\"wp-image-2572\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License-1024x270.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License-300x79.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License-768x202.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License-1536x405.jpg 1536w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Bastion_License-2048x539.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">4. Launch the Azure Cli with <\/p>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li><span class=\"has-inline-color has-vivid-cyan-blue-color\">AZ login<\/span><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142749.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"251\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142749-1024x251.jpg\" alt=\"\" class=\"wp-image-2573\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142749-1024x251.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142749-300x73.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142749-768x188.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142749.jpg 1230w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">5. You will be prompted for Authentication via your web browser<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/AZ-Login.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/AZ-Login.jpg\" alt=\"\" class=\"wp-image-2575\" width=\"514\" height=\"250\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/AZ-Login.jpg 832w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/AZ-Login-300x146.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/AZ-Login-768x374.jpg 768w\" sizes=\"auto, (max-width: 514px) 100vw, 514px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142838.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"660\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142838-1024x660.jpg\" alt=\"\" class=\"wp-image-2576\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142838-1024x660.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142838-300x193.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142838-768x495.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-142838.jpg 1224w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">6. When the Azure CLI is Open we need the following information to open the RDP connection:<\/p>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li>BastionName<\/li><\/ul>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li>ResourceGroupName<\/li><\/ul>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li>VMResourceId<\/li><\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">It is possible to gather them using <\/p>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li><span class=\"has-inline-color has-vivid-cyan-blue-color\">AZ network bastion list<\/span><\/li><li><span class=\"has-inline-color has-vivid-cyan-blue-color\">AZ vm list<\/span><\/li><\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143036.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"254\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143036-1024x254.jpg\" alt=\"\" class=\"wp-image-2578\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143036-1024x254.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143036-300x74.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143036-768x191.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143036.jpg 1189w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143010.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"674\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143010-1024x674.jpg\" alt=\"\" class=\"wp-image-2577\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143010-1024x674.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143010-300x198.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143010-768x506.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143010.jpg 1227w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143131.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"417\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143131-1024x417.jpg\" alt=\"\" class=\"wp-image-2579\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143131-1024x417.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143131-300x122.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143131-768x313.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/Screenshot-2021-12-16-143131.jpg 1195w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">7. Use the following command (replacing the parameters with the information gathered previously)<\/p>\n\n\n\n<ul class=\"has-large-font-size wp-block-list\"><li><span class=\"has-inline-color has-vivid-cyan-blue-color\">az network bastion rdp &#8211;name &#8220;&lt;BastionName&gt;&#8221; &#8211;resource-group &#8220;&lt;ResourceGroupName&gt;&#8221; &#8211;target-resource-id &#8220;&lt;VMResourceId&gt;&#8221;<\/span><\/li><\/ul>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">8. The RDP client will require your credentials (if they were not saved in a previous connection) and then connect the VM<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"600\" src=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-1024x600.jpg\" alt=\"\" class=\"wp-image-2580\" srcset=\"https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-1024x600.jpg 1024w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-300x176.jpg 300w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-768x450.jpg 768w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-1536x899.jpg 1536w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-2048x1199.jpg 2048w, https:\/\/modern-workplace.uk\/wp-content\/uploads\/2021\/12\/RDP-250x145.jpg 250w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p class=\"has-large-font-size wp-block-paragraph\">More details and steps for SSH are available here <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/bastion\/connect-native-client-windows \">Connect to a VM using Bastion and the native client on your Windows computer (Preview)<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Microsoft has made available a method to access from your native client, i.e. SSH or Remote Desktop Protocol (RDP) client. <\/p>\n","protected":false},"author":1,"featured_media":2572,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_sitemap_exclude":false,"_sitemap_priority":"","_sitemap_frequency":"","twitterCardType":"","cardImageID":0,"cardImage":"","cardTitle":"","cardDesc":"","cardImageAlt":"","cardPlayer":"","cardPlayerWidth":0,"cardPlayerHeight":0,"cardPlayerStream":"","cardPlayerCodec":"","footnotes":""},"categories":[765,753,752,757],"tags":[793,798,794,797,759,796,795],"class_list":["post-2569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-765","category-microsoft365","category-microsoft-teams","category-office-365","tag-azure","tag-azure-bastion","tag-azure-cli","tag-bastion","tag-microsoft-365","tag-virtual-machine","tag-vm"],"_links":{"self":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2569"}],"version-history":[{"count":4,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2569\/revisions"}],"predecessor-version":[{"id":2584,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/posts\/2569\/revisions\/2584"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=\/wp\/v2\/media\/2572"}],"wp:attachment":[{"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/modern-workplace.uk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}