{"id":3022,"date":"2017-12-03T12:58:37","date_gmt":"2017-12-03T12:58:37","guid":{"rendered":"http:\/\/pariswells.com\/blog\/?p=3022"},"modified":"2017-12-03T12:58:37","modified_gmt":"2017-12-03T12:58:37","slug":"how-to-create-nat-rules-in-a-azure-resource-manager","status":"publish","type":"post","link":"https:\/\/pariswells.com\/blog\/azure\/how-to-create-nat-rules-in-a-azure-resource-manager","title":{"rendered":"How to create NAT rules in a Azure Resource Manager"},"content":{"rendered":"<p>If you are looking to\u00a0Migrate a classic VM in Azure to ARM , you will need to change your Endpoint port forwards via a Load Balancer<\/p><p>Go to the Azure portal:\u00a0<a href=\"http:\/\/portal.azure.com\/\" target=\"_blank\" rel=\"noopener\">http:\/\/portal.azure.com<\/a><\/p><p>Click \u201c<em>NEW<\/em>\u201d\u00a0<strong>-&gt;<\/strong>\u00a0w<em>rite \u201cLoad Balancer\u201d in search field<\/em>\u00a0<strong>-&gt;<\/strong>\u00a0<em>Click \u201cLoad Balancer\u201d<\/em><\/p><p><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-14_24_47-Everything-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-131 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-14_24_47-Everything-Microsoft-Azure.png\" sizes=\"auto, (max-width: 1163px) 100vw, 1163px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-14_24_47-Everything-Microsoft-Azure.png 1412w, \/wp-content\/uploads\/2017\/11\/2017-11-17-14_24_47-Everything-Microsoft-Azure-300x68.png 300w, \/wp-content\/uploads\/2017\/11\/2017-11-17-14_24_47-Everything-Microsoft-Azure-768x175.png 768w, \/wp-content\/uploads\/2017\/11\/2017-11-17-14_24_47-Everything-Microsoft-Azure-1024x233.png 1024w\" alt=\"\" width=\"1163\" height=\"264\" \/><\/a><\/p><p>After you have clicked the \u201cLoad Balancer\u201d, click the \u201cCreate\u201d button.<\/p><p>Then fill out the configuration\u00a0blade as shown below:<\/p><p><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-14_39_53-Zoomit-Zoom-Window.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-132 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-14_39_53-Zoomit-Zoom-Window.png\" sizes=\"auto, (max-width: 811px) 100vw, 811px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-14_39_53-Zoomit-Zoom-Window.png 811w, \/wp-content\/uploads\/2017\/11\/2017-11-17-14_39_53-Zoomit-Zoom-Window-260x300.png 260w, \/wp-content\/uploads\/2017\/11\/2017-11-17-14_39_53-Zoomit-Zoom-Window-768x885.png 768w\" alt=\"\" width=\"811\" height=\"935\" \/><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-14_39_53-Zoomit-Zoom-Window.png\" \/><\/a><\/p><p id=\"clIjepN\">Azure will take a few minutes to create the Load Balancer.<\/p><p>&nbsp;<\/p><p>Once created, your resource group will look like this:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_lb_rg.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-162  img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_lb_rg.png\" sizes=\"auto, (max-width: 583px) 100vw, 583px\" srcset=\"\/wp-content\/uploads\/2017\/11\/portforward_lb_rg.png 605w, \/wp-content\/uploads\/2017\/11\/portforward_lb_rg-300x228.png 300w\" alt=\"\" width=\"583\" height=\"442\" \/><\/a><\/p><h3><strong>Step 2: Configure Load Balancer Backend Pool<\/strong><\/h3><p>In order to connect our newly created load balancer to our virtual machines, we need to create a so-called \u201cBackend Pool\u201d.<\/p><p>To do so click on your load balancer to open its configuration blade.<\/p><p>Click on the item called \u201cBackend Pool\u201d in the menu to the left:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_12_41-Backend-address-pools-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-136 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_12_41-Backend-address-pools-Microsoft-Azure.png\" sizes=\"auto, (max-width: 156px) 100vw, 156px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-15_12_41-Backend-address-pools-Microsoft-Azure.png 223w, \/wp-content\/uploads\/2017\/11\/2017-11-17-15_12_41-Backend-address-pools-Microsoft-Azure-107x300.png 107w\" alt=\"\" width=\"156\" height=\"438\" \/><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_12_41-Backend-address-pools-Microsoft-Azure.png\" \/><\/a><\/p><p>Then click the \u201cAdd\u201d button:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_20_43-Backend-address-pools-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-139 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_20_43-Backend-address-pools-Microsoft-Azure.png\" sizes=\"auto, (max-width: 304px) 100vw, 304px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-15_20_43-Backend-address-pools-Microsoft-Azure.png 304w, \/wp-content\/uploads\/2017\/11\/2017-11-17-15_20_43-Backend-address-pools-Microsoft-Azure-300x149.png 300w\" alt=\"\" width=\"304\" height=\"151\" \/><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_20_43-Backend-address-pools-Microsoft-Azure.png\" \/><\/a><\/p><p id=\"mcLnqGX\">\u00a0<\/p><p>&nbsp;<\/p><p>Fill out the \u201cAdd backend pool\u201d configuration blade as shown below:<\/p><p><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_backendpool_vm0_rg-e1511130941672.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-163 size-full img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_backendpool_vm0_rg-e1511130941672.png\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" srcset=\"\/wp-content\/uploads\/2017\/11\/portforward_backendpool_vm0_rg-e1511130941672.png 731w, \/wp-content\/uploads\/2017\/11\/portforward_backendpool_vm0_rg-e1511130941672-300x187.png 300w\" alt=\"\" width=\"731\" height=\"456\" \/><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_backendpool_vm0_rg-e1511130941672.png\" \/><br \/><\/a><\/p><p>Now click on \u201c+ Add a target network IP configuration\u201d:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_23_19-Add-backend-pool-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-141 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_23_19-Add-backend-pool-Microsoft-Azure.png\" sizes=\"auto, (max-width: 570px) 100vw, 570px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-15_23_19-Add-backend-pool-Microsoft-Azure.png 570w, \/wp-content\/uploads\/2017\/11\/2017-11-17-15_23_19-Add-backend-pool-Microsoft-Azure-300x44.png 300w\" alt=\"\" width=\"570\" height=\"84\" \/><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_backendpool_vm0_rg-e1511130941672.png\" \/><\/a><\/p><p id=\"JUOgEop\"><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_23_19-Add-backend-pool-Microsoft-Azure.png\">\u00a0<\/a><\/p><p>&nbsp;<\/p><p>\u2026and select the IP configuration for your virtual machine:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_24_57-Add-backend-pool-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-142 size-full img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_24_57-Add-backend-pool-Microsoft-Azure.png\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-15_24_57-Add-backend-pool-Microsoft-Azure.png 610w, \/wp-content\/uploads\/2017\/11\/2017-11-17-15_24_57-Add-backend-pool-Microsoft-Azure-300x111.png 300w\" alt=\"\" width=\"610\" height=\"225\" \/><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_24_57-Add-backend-pool-Microsoft-Azure.png\" \/><\/a><\/p><p id=\"jEmqCtM\"><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_24_57-Add-backend-pool-Microsoft-Azure.png\">\u00a0<\/a><\/p><p>&nbsp;<\/p><p>Finally, click the \u201cOK\u201d button to save the Backend Pool.<\/p><p>Now repeat this step; \u00a0but this time choose\u00a0<strong>VM1<\/strong>\u00a0instead of VM0.<\/p><p>All in all, this will give us two backend pools pointing to VM0 and VM1 respectively:<\/p><p><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_backendpool_all.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-165 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_backendpool_all.png\" sizes=\"auto, (max-width: 701px) 100vw, 701px\" srcset=\"\/wp-content\/uploads\/2017\/11\/portforward_backendpool_all.png 701w, \/wp-content\/uploads\/2017\/11\/portforward_backendpool_all-300x97.png 300w\" alt=\"\" width=\"701\" height=\"227\" \/><\/a><\/p><p>It will take Azure 1-2 minutes to create the Backend Pools<\/p><h3><strong>Step 3: Configure NAT rules<\/strong><\/h3><p>Now our load balancer is connected to our virtual machine and we now need to configure rules for redirecting network traffic.<\/p><p>Start by clicking \u201cInbound NAT Rules\u201d in the menu to the left:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_27_41-Inbound-NAT-rules-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-143 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_27_41-Inbound-NAT-rules-Microsoft-Azure.png\" sizes=\"auto, (max-width: 208px) 100vw, 208px\" srcset=\"\/wp-content\/uploads\/2017\/11\/2017-11-17-15_27_41-Inbound-NAT-rules-Microsoft-Azure.png 208w, \/wp-content\/uploads\/2017\/11\/2017-11-17-15_27_41-Inbound-NAT-rules-Microsoft-Azure-128x300.png 128w\" alt=\"\" width=\"208\" height=\"486\" \/><\/a><\/p><p>Then click the \u201cAdd\u201d button:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_28_09-Inbound-NAT-rules-Microsoft-Azure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-144 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/2017-11-17-15_28_09-Inbound-NAT-rules-Microsoft-Azure.png\" alt=\"\" width=\"256\" height=\"105\" \/><\/a><\/p><p>Fill out the \u201cAdd inbound NAT rule\u201d configuration blade as shown below:<br \/><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_natrule.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-166 size-full img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_natrule.png\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" srcset=\"\/wp-content\/uploads\/2017\/11\/portforward_natrule.png 581w, \/wp-content\/uploads\/2017\/11\/portforward_natrule-200x300.png 200w\" alt=\"\" width=\"581\" height=\"870\" \/><\/a><\/p><p><img decoding=\"async\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_natrule.png\" \/><\/p><p id=\"RGHqeYg\"><img loading=\"lazy\" decoding=\"async\" width=\"581\" height=\"870\" class=\"alignnone size-full wp-image-3029  img-responsive\" src=\"http:\/\/pariswells.com\/blog\/wp-content\/uploads\/2017\/12\/img_5a23f484c39be.png\" alt=\"\" srcset=\"https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2017\/12\/img_5a23f484c39be.png 581w, https:\/\/pariswells.com\/blog\/wp-content\/uploads\/2017\/12\/img_5a23f484c39be-200x300.png 200w\" sizes=\"auto, (max-width: 581px) 100vw, 581px\" \/><\/p><p>&nbsp;<\/p><p>Now repeat this step, but this time choose\u00a0<strong>VM1<\/strong>\u00a0instead of VM0 .<\/p><p>We will now end up with two Inbound NAT Rules: one with port 8088 associated to VM0 and one with port 8089 associates to VM1 :<\/p><p><a href=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_natrule_all.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-167 img-responsive\" src=\"https:\/\/rasmusg.net\/wp-content\/uploads\/2017\/11\/portforward_natrule_all.png\" sizes=\"auto, (max-width: 508px) 100vw, 508px\" srcset=\"\/wp-content\/uploads\/2017\/11\/portforward_natrule_all.png 508w, \/wp-content\/uploads\/2017\/11\/portforward_natrule_all-300x73.png 300w\" alt=\"\" width=\"508\" height=\"124\" \/><\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>If you are looking to\u00a0Migrate a classic VM in Azure to ARM , you will need to change your Endpoint port forwards via a Load BalancerGo to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2092],"tags":[1464,2263,2261,2260,2258,929,1409,2262,2259],"class_list":["post-3022","post","type-post","status-publish","format-standard","hentry","category-azure","tag-azure","tag-change-rdp-port","tag-classic","tag-endpoint","tag-load-balancer","tag-migration","tag-nat","tag-network-address-translation","tag-port-forward"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/3022","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/comments?post=3022"}],"version-history":[{"count":1,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/3022\/revisions"}],"predecessor-version":[{"id":3030,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/posts\/3022\/revisions\/3030"}],"wp:attachment":[{"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/media?parent=3022"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/categories?post=3022"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pariswells.com\/blog\/wp-json\/wp\/v2\/tags?post=3022"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}