<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="https://www.w3.org/2005/Atom" xmlns:sy="https://purl.org/rss/1.0/modules/syndication/" xmlns:dc="https://purl.org/dc/elements/1.1/" xmlns:content="https://purl.org/rss/1.0/modules/content/" xmlns:wfw="https://wellformedweb.org/CommentAPI/" xmlns:slash="https://purl.org/rss/1.0/modules/slash/"
  version="2.0">
  <channel>
    <title>msft_Ashwin's blog</title>
    <atom:link
      href="https://docs.microsoft.com/archive/blogs/msftashwin/feed.xml"
      rel="self"
      type="application/rss+xml" />
    <link>https://docs.microsoft.com/archive/blogs/msftashwin/feed.xml</link>
    <description>Azure Networking and Security</description>
    <lastBuildDate>Wed, 17 Apr 2019 04:08:21 GMT</lastBuildDate>
    <language>en-US</language>
    <sy:updatePeriod>hourly</sy:updatePeriod>
    <sy:updateFrequency>1</sy:updateFrequency>
    <item>
      <title>How to Setup and Protect an Azure Application with a Barracuda Firewall</title>
      <link>https://docs.microsoft.com/archive/blogs/msftashwin/how-to-setup-and-protect-an-azure-application-with-a-barracuda-firewall-2</link>
      <pubDate>Tue, 28 Jan 2014 10:52:00 GMT</pubDate>
      <dc:creator><![CDATA[Ashwin Palekar - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msftashwin/2014/01/28/how-to-setup-and-protect-an-azure-application-with-a-barracuda-firewall-2/</guid>
      <description><![CDATA[Editor's Note: This post comes from Tim Omta, Senior Application Development Manager
1...]]></description>
      <content:encoded><![CDATA[<p>Editor's Note: This post comes from Tim Omta, Senior Application Development Manager</p>
<h1>1 Introduction</h1>
<p>If a business has an application hosted on Windows Azure, it will at some point be exposed to the internet in order to be commercially useful.&nbsp; The public internet brings with it both customers and attackers.&nbsp; As the value of the data within an application increases, so does its attractiveness to attackers.&nbsp; Businesses may be evaluating the cost benefit of hosting their Web Applications in Azure, but have concerns about protecting their data from attackers while providing their customers a positive experience.&nbsp;&nbsp; With an on-premises datacenter, there are a number of options for internet edge devices to protect applications from attackers.&nbsp; Some manufacturers of these types of devices are now making them available within hosting providers such as Windows Azure.</p>
<p>Barracuda Networks has created such a device for Windows Azure. Their Web Application Firewall virtual device may be used to protect Azure IaaS web servers or PaaS web roles. In this post, I will introduce you to the Barracuda Networks security solution for Windows Azure by walking you through setting it up in front of a simple PaaS application. There are four major parts to this post:</p>
<ul>
<li>Network Setup</li>
<li>Azure PaaS Application</li>
<li>Barracuda Web Application Firewall (WAF) Setup</li>
<li>Exposing the Application</li>
</ul>
<p>In this walkthrough, we will create a system that looks like the architectural diagram below:</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5086.012814_1852_HowtoSetupa1.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5086.012814_5F00_1852_5F00_HowtoSetupa1.png" alt="" /></p>
<h1>2 Network Setup</h1>
<p>The first part of our setup will be the network because it is the foundational piece that connects the PaaS application, the Web Application Firewall (WAF), and the internet together within Azure.&nbsp; Choices need to be made carefully here because they cannot be changed.&nbsp; We will create a network, two subnets within it, and an affinity group.&nbsp; The network is the overall pool of IP addresses all resources will draw from.&nbsp; The 2 subnets will be named Subnet-1 and Subnet-2.&nbsp; Subnet-1 will be the WAF subnet and contain only WAFs.&nbsp; Subnet-2 will be the application subnet and contain only application PaaS roles.&nbsp; This subnet distinction is made so you know what type of resource you're communicating with by its address.&nbsp; In addition, it allows you to secure each type of resource by subnet (it essentially groups the resource types so you can deal with the groups appropriately). The subnets provide a security and address allocation boundary.</p>
<p>Finally, the affinity group will allow us to tell Azure to group all the machines with the newly created network.&nbsp; The group also collocates our resources geographically to decrease communication latency.</p>
<h2>2.1 Create the Network and Affinity Group</h2>
<p>Begin by signing in to the Azure management portal at <a href="https://manage.windowsazure.com/">https://manage.windowsazure.com/</a>.</p>
<p>Click on Networks in the left pane</p>
<p>Click Virtual Networks on the top middle of the page</p>
<p>Click on New in the bottom left</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/6864.image_5DA8A671.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/6864.image_5F00_5DA8A671.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/7633.012814_1852_HowtoSetupa2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/7633.012814_5F00_1852_5F00_HowtoSetupa2.png" alt="" border="0" /></a></p>
<p>Click on network services</p>
<p>Click on virtual network</p>
<p>Click on custom create</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/5277.image_3CB7C47B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/5277.image_5F00_3CB7C47B.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/1185.012814_1852_HowtoSetupa3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/1185.012814_5F00_1852_5F00_HowtoSetupa3.png" alt="" border="0" /></a></p>
<p>Choose your names carefully in this dialog.&nbsp; You'll use the network name and affinity group name throughout all the rest of your infrastructure, so you can't change them later without tearing everything down.</p>
<p>Type your network name in the Name text box</p>
<p>Make sure "Create a new affinity group" is selected for Affinity Group</p>
<p>Choose a region where your network will be built and your resources geographically located</p>
<p>Type a name for your affinity group</p>
<p>Click OK</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/1004.image_74F8CC44.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/1004.image_5F00_74F8CC44.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/8032.012814_1852_HowtoSetupa4.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/8032.012814_5F00_1852_5F00_HowtoSetupa4.png" alt="" border="0" /></a></p>
<h2>2.2 Network Address and Subnet Address Ranges</h2>
<p>Next you'll see a page like that pictured below.</p>
<p>Choose an address space for your network.&nbsp; Note that I chose 172.16.x.x overall network address range, so the first two dotted numbers (octets) will not change for anything on this network.&nbsp; The 172.16.1.0/16 tells Azure that I intend to start IP address allocation from 172.16.1.0 and will be varying the last 16 bits (last two octets)&nbsp;as addresses.&nbsp; I will use the last 2 octets as subnet number and device address respectively.</p>
<p>For address space type in 172.16.1.0/16</p>
<p>Add a subnet named Subnet-1 with an address space of 172.16.1.0/24</p>
<p>Add a subnet named Subnet-2 with an address space of 172.16.2.0/24</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/8625.image_6009DA82.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/8625.image_5F00_6009DA82.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/0513.012814_1852_HowtoSetupa5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/0513.012814_5F00_1852_5F00_HowtoSetupa5.png" alt="" border="0" /></a>&nbsp;</p>
<p>You completed network should show in your portal as created as in the figure below</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/3487.image_789C0883.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/3487.image_5F00_789C0883.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5811.012814_1852_HowtoSetupa6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5811.012814_5F00_1852_5F00_HowtoSetupa6.png" alt="" border="0" /></a></p>
<p>You are now ready to begin placing the WAF on Subnet-1 and the application on Subnet-2.</p>
<p>Next, we'll create and configure the application that will be protected.</p>
<h1>3 Azure PaaS Application</h1>
<p>In this step, we'll create an application and deploy it to a PaaS web role.&nbsp; The application itself is not the important part, but the configuration of the application is.&nbsp; The configuration steps need to be done for any web role that will be protected by the WAF.&nbsp; The configuration also assumes you've prepared the network layout we created earlier.&nbsp; The network name, affinity group, and subnet names are integral to the application configuration.&nbsp; The deployed application will not be able to receive traffic from the internet directly.&nbsp; It will only be able to communicate with roles on its own subnet (Subnet-2, the application subnet) and the WAF subnet (Subnet-1, the WAF subnet).</p>
<h2>3.1 Create a Demo Application</h2>
<p>In Visual Studio, open the File menu, choose New, and click on project</p>
<p>Choose Cloud in the left hand pane</p>
<p>Click on the Windows Azure Cloud Service template in the center pane</p>
<p>Name the project or leave the default WindowsAzure1 name. I named mine DemoApp, so that is the application name you'll see from here on.</p>
<p>Click OK</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/3051.image_3924F9C5.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/3051.image_5F00_3924F9C5.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/1106.012814_1852_HowtoSetupa7.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/1106.012814_5F00_1852_5F00_HowtoSetupa7.png" alt="" border="0" /></a></p>
<p>In the next dialog, click on ASP.Net Web Role</p>
<p>Click the &gt; button to add the web role to it</p>
<p>Click OK</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/6012.image_57FDFE54.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/6012.image_5F00_57FDFE54.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/6404.012814_1852_HowtoSetupa8.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/6404.012814_5F00_1852_5F00_HowtoSetupa8.png" alt="" border="0" /></a></p>
<p>Open Default.aspx and change the &lt;h2&gt; tag contents from</p>
<p>"Modify this template to jump-start your ASP.NET application"</p>
<p>to</p>
<p>"This application is protected by the Barracuda Web Application Firewall"</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/4426.image_75093DCD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/4426.image_5F00_75093DCD.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/7065.012814_1852_HowtoSetupa9.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/7065.012814_5F00_1852_5F00_HowtoSetupa9.png" alt="" border="0" /></a></p>
<p>Up to this point, we've just created a standard Azure Web Role application.&nbsp; The modifications below are the important ones to make to any application you need to place behind the WAF in Azure.</p>
<h2>3.2 Configuring the Application</h2>
<p>First we'll modify the application configuration to place it on the on the application subnet of the network (Subnet-2).</p>
<p>In your Visual Studio cloud project, open the ServiceConfiguration.Cloud.cscfg file</p>
<p>Add a <a href="https://msdn.microsoft.com/en-us/library/windowsazure/jj156091.aspx">NetworkConfiguration</a> section within the ServiceConfiguration tags like that shown in the figure below.&nbsp; You can add it just after the closing Role tag.</p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;<span style="color: #a31515;">NetworkConfiguration<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt;"><span style="background-color: white;"> &lt;<span style="color: #a31515;">VirtualNetworkSite<span style="color: blue;"> <span style="color: red;">name<span style="color: blue;">=<span style="color: black;">"</span></span></span></span></span></span><span style="color: blue;"><span style="background-color: yellow;">DemoVNet</span><span style="color: black; background-color: white;">"<span style="color: blue;">/&gt;</span></span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;<span style="color: #a31515;">AddressAssignments<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt;"><span style="background-color: white;"> &lt;<span style="color: #a31515;">InstanceAddress<span style="color: blue;"> <span style="color: red;">roleName<span style="color: blue;">=<span style="color: black;">"</span></span></span></span></span></span><span style="color: blue;"><span style="background-color: yellow;">WebRole1</span><span style="color: black; background-color: white;">"<span style="color: blue;">&gt;</span></span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;<span style="color: #a31515;">Subnets<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt;"><span style="background-color: white;"> &lt;<span style="color: #a31515;">Subnet<span style="color: blue;"> <span style="color: red;">name<span style="color: blue;">=<span style="color: black;">"</span></span></span></span></span></span><span style="color: blue;"><span style="background-color: yellow;">Subnet-2</span><span style="color: black; background-color: white;">"<span style="color: blue;">/&gt;</span></span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;/<span style="color: #a31515;">Subnets<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;/<span style="color: #a31515;">InstanceAddress<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;/<span style="color: #a31515;">AddressAssignments<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue;"><span style="font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;/<span style="color: #a31515;">NetworkConfiguration<span style="color: blue;">&gt;</span></span></span> </span></p>
<p>Assign the name attribute of the VirtualNetworkingSite to the name of the network. If you used the same name as I did, it is called "DemoVNet"</p>
<p>Assign the roleName attribute of the InstanceAddress tag to the same value as the name attribute of the Role tag that is already in this file</p>
<p>Assign the name attribute of the Subnet tag to the name of the subnet we created and designated to be the application subnet, "Subnet-2"</p>
<p>Your ServiceConfiguration.Cloud.cscfg should look similar to the one pictured below</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/6087.012814_1852_HowtoSetupa10.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/6087.012814_5F00_1852_5F00_HowtoSetupa10.png" alt="" /></p>
<p>Save the file</p>
<h2>3.3 Add a Command File to Configure the Application Firewall</h2>
<p>The main point of this is to add code to open the firewall of the PaaS role to accept traffic from the WAF subnet (Subnet-1).&nbsp; I'm showing you how to do this with a role startup task that calls <a href="https://technet.microsoft.com/en-us/library/cc737845(v=WS.10).aspx">netsh</a> to add a firewall rule.&nbsp; This can be done in other ways such as C# code in your role OnStart method.</p>
<p>Right click on the WebRole1 project</p>
<p>Click Add</p>
<p>Choose Text File</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/4527.image_7E1D7B61.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/4527.image_5F00_7E1D7B61.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5415.012814_1852_HowtoSetupa11.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5415.012814_5F00_1852_5F00_HowtoSetupa11.png" alt="" border="0" /></a></p>
<p>Name the file Start.cmd</p>
<p>Click OK</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/1680.image_0C146CB2.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/1680.image_5F00_0C146CB2.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/6318.012814_1852_HowtoSetupa12.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/6318.012814_5F00_1852_5F00_HowtoSetupa12.png" alt="" border="0" /></a></p>
<p>Add these lines to start.cmd</p>
<p>eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO demoWebApp /D "Webrole start task complete" <br />netsh firewall add portopening protocol=TCP port=80 name="demoWebApp" mode=ENABLE scope=CUSTOM addresses=172.16.1.0/255.255.255.0 profile=CURRENT</p>
<p>The first line will post an event to the Windows Server application event log to indicate that start.cmd ran</p>
<p>The second line opens port 80 for TCP traffic on the PaaS web role to traffic from the WAF subnet (remember that we created Subnet-1 to be in the 172.16.1.x address space).</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/4377.image_44C1A770.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/4377.image_5F00_44C1A770.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/4265.012814_1852_HowtoSetupa13.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/4265.012814_5F00_1852_5F00_HowtoSetupa13.png" alt="" border="0" /></a></p>
<p>By default, Visual Studio will save start.cmd in Unicode, however the cmd command processor can't run that.&nbsp; You need to ensure you save the file in ASCII encoding so the cmd can be executed.</p>
<p>To do this click on the Visual Studio File menu and choose Advanced Save Options</p>
<p>Change the encoding to US-ASCII &ndash; Codepage 20127</p>
<p>Click OK</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/5635.image_58DD54AA.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/5635.image_5F00_58DD54AA.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/2112.012814_1852_HowtoSetupa14.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/2112.012814_5F00_1852_5F00_HowtoSetupa14.png" alt="" border="0" /></a></p>
<p>Select start.cmd in Solution Explorer</p>
<p>In the properties of the start.cmd file, set "Build Action" to "None"</p>
<p>Set "Copy to Output Directory" to "Copy Always"</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/3515.image_639D3CB0.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/3515.image_5F00_639D3CB0.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/0068.012814_1852_HowtoSetupa15.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/0068.012814_5F00_1852_5F00_HowtoSetupa15.png" alt="" border="0" /></a></p>
<p>Save the start.cmd file (File, Save)</p>
<p>We have created a batch file that is intended to run when our role is started.&nbsp; Now we need to configure the role not to accept internet traffic and to actually run our start.cmd file.</p>
<h2>3.4 Configure the Application Endpoint and Startup Task</h2>
<p>In the cloud project, open the ServiceDefinition.csdef file</p>
<p>Change the InputEndpoint tag to <a href="https://msdn.microsoft.com/en-us/library/windowsazure/gg557553.aspx">InternalEndpoint</a></p>
<p>Add a <a href="https://msdn.microsoft.com/en-us/library/windowsazure/gg557553.aspx">Startup</a> tag to run start.cmd under the closing Endpoints tag</p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;<span style="color: #a31515;">Startup<span style="color: blue;">&gt;</span></span></span></p>
<p><span style="color: blue; font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;<span style="color: #a31515;">Task<span style="color: blue;"> <span style="color: red;">commandLine<span style="color: blue;">=<span style="color: black;">"<span style="color: blue;">start.cmd<span style="color: black;">"<span style="color: blue;"> <span style="color: red;">executionContext<span style="color: blue;">=<span style="color: black;">"<span style="color: blue;">elevated<span style="color: black;">"<span style="color: blue;"> <span style="color: red;">taskType<span style="color: blue;">=<span style="color: black;">"<span style="color: blue;">simple<span style="color: black;">"<span style="color: blue;">&gt;&lt;/<span style="color: #a31515;">Task<span style="color: blue;">&gt;</span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></span></p>
<p><span style="color: blue;"><span style="font-family: Consolas; font-size: 9pt; background-color: white;"> &lt;/<span style="color: #a31515;">Startup<span style="color: blue;">&gt;</span></span></span> </span></p>
<p>Your ServiceDefinition.csdef should look similar to that shown below</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/7723.image_6E5D24B6.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/7723.image_5F00_6E5D24B6.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/6320.012814_1852_HowtoSetupa16.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/6320.012814_5F00_1852_5F00_HowtoSetupa16.png" alt="" border="0" /></a></p>
<p>Save the file</p>
<h2>3.5 Add a Cloud Service for the Application in the Proper Affinity Group</h2>
<p>Next, we need to custom create a cloud service to host the application.&nbsp; We're custom creating it so that we can specify the affinity group to later ensure that the application can be placed within the application subnet, Subnet-2, of the network we created.</p>
<p>In the Azure management portal, click on Cloud Services in the left pane</p>
<p>Click on New at the bottom left</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/4786.image_3640C842.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/4786.image_5F00_3640C842.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5342.012814_1852_HowtoSetupa17.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5342.012814_5F00_1852_5F00_HowtoSetupa17.png" alt="" border="0" /></a></p>
<p>Choose Compute, Cloud Service</p>
<p>Click Custom Create</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/4784.image_6594CE7D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/4784.image_5F00_6594CE7D.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/0574.012814_1852_HowtoSetupa18.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/0574.012814_5F00_1852_5F00_HowtoSetupa18.png" alt="" border="0" /></a></p>
<p>Give the application cloud service a URL of your choice. I used the same name as my application.</p>
<p>Select the affinity group that you created when you created the network.&nbsp; This is crucial as it places the application cloud service in the same group as the network.</p>
<p>Click OK check mark</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/3247.image_5B633410.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/3247.image_5F00_5B633410.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/8078.012814_1852_HowtoSetupa19.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/8078.012814_5F00_1852_5F00_HowtoSetupa19.png" alt="" border="0" /></a></p>
<h2>3.6 Publish the Application</h2>
<p>Finally, we will publish the application into the custom created cloud service.</p>
<p>In Visual Studio, right click on the Cloud Project and choose Publish&hellip;</p>
<p>Choose your subscription</p>
<p>Click Next</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/0486.image_3ADE850F.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/0486.image_5F00_3ADE850F.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/4377.012814_1852_HowtoSetupa20.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/4377.012814_5F00_1852_5F00_HowtoSetupa20.png" alt="" border="0" /></a></p>
<p>Choose the cloud service you just created.&nbsp; Notice that it shows the affinity group we associated the service with.</p>
<p>Configure RDP and any other settings you like</p>
<p>Click Next</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/1348.image_67F6028E.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/1348.image_5F00_67F6028E.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5857.012814_1852_HowtoSetupa21.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5857.012814_5F00_1852_5F00_HowtoSetupa21.png" alt="" border="0" /></a></p>
<p>Finally, you should see a summary similar to the below figure</p>
<p>Click Publish</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/7610.image_14A14D19.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/7610.image_5F00_14A14D19.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/3704.012814_1852_HowtoSetupa22.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/3704.012814_5F00_1852_5F00_HowtoSetupa22.png" alt="" border="0" /></a></p>
<p>After a few minutes, your application will be published out to Azure and running there.&nbsp; If you enabled RDP, you can log onto the PaaS role instance and take a look at the event log.&nbsp; If the startup task ran correctly, you should see the message "Webrole start task complete" in the role application log.&nbsp; If you look closely at the start.cmd file we created, you'll see the first line posts that event message.&nbsp; In addition, you should see the firewall rule listed in the Windows Firewall console for the role.&nbsp; The rule should be present with the name it was given in the netsh line of the start.cmd.</p>
<p>Now that the application is up and running, we'll setup the WAF.</p>
<h1>4 WAF Setup</h1>
<p>If you have not done so already, you need to <a href="https://www.barracuda.com/purchase/evaluation/">acquire</a> the WAF VHD file from Barracuda Networks.&nbsp; Ask for the Barracuda Web Application Firewall Azure Virtual Device.</p>
<h2>4.1 Upload the Barracuda VHD to Your Azure Storage Account</h2>
<p>You can use the <a href="https://msdn.microsoft.com/en-us/library/dn205185.aspx">add-azurevhd</a> Azure PowerShell cmdlet similar to that shown below.&nbsp; The source variable is the full path to the vhd you downloaded from Barracuda.&nbsp; The destination variable is the URL of the storage account container and filename to upload the vhd to. For instructions on setting up the Azure PowerShell cmdlets, see <a href="https://msdn.microsoft.com/en-us/library/windowsazure/jj156055.aspx">https://msdn.microsoft.com/en-us/library/windowsazure/jj156055.aspx</a>.</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/0184.image_0203B557.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/0184.image_5F00_0203B557.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/8585.012814_1852_HowtoSetupa23.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/8585.012814_5F00_1852_5F00_HowtoSetupa23.png" alt="" border="0" /></a></p>
<h2>4.2 Create a VM Disk from the VHD</h2>
<p>In the Azure management portal, select Virtual Machines on the left</p>
<p>Click on Disks near the top middle of the page</p>
<p>Click on Create</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/0243.image_2148ECDB.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/0243.image_5F00_2148ECDB.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/0488.012814_1852_HowtoSetupa24.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/0488.012814_5F00_1852_5F00_HowtoSetupa24.png" alt="" border="0" /></a></p>
<p>On the next dialog, name the disk</p>
<p>Set the VHD URL to the path and filename of the vhd you uploaded</p>
<p>Check the box "VHD contains an operating system"</p>
<p>Select Linux for the operating system</p>
<p>Click the check mark</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/6403.image_551373DD.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/6403.image_5F00_551373DD.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/7345.012814_1852_HowtoSetupa25.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/7345.012814_5F00_1852_5F00_HowtoSetupa25.png" alt="" border="0" /></a></p>
<p>The disk is now created.&nbsp; The next step is to create a VM from it.</p>
<h2>4.3 Create the IaaS Barracuda VM</h2>
<p>To create a VM from the disk, select Virtual Machines in the management portal</p>
<p>Click on the New button at the bottom of the page</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/8726.image_54A9D199.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/8726.image_5F00_54A9D199.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5282.012814_1852_HowtoSetupa26.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5282.012814_5F00_1852_5F00_HowtoSetupa26.png" alt="" border="0" /></a></p>
<p>Choose Compute, Virtual Machine</p>
<p>Click From Gallery</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/8875.image_2652DC9D.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/8875.image_5F00_2652DC9D.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/4606.012814_1852_HowtoSetupa27.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/4606.012814_5F00_1852_5F00_HowtoSetupa27.png" alt="" border="0" /></a></p>
<p>On the next dialog, click on My Disks on the left</p>
<p>Scroll to the bottom of the list on the right</p>
<p>Click on disk you just created</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/7288.image_50C19E6B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/7288.image_5F00_50C19E6B.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/4214.012814_1852_HowtoSetupa28.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/4214.012814_5F00_1852_5F00_HowtoSetupa28.png" alt="" border="0" /></a></p>
<p>Name the virtual machine</p>
<p>Choose a size for the VM.&nbsp; The selection of size depends on how much traffic your WAF must handle.&nbsp; Unless you have very light traffic to your site, I'd start with at least a Medium.</p>
<p>Click the Next arrow</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/4722.image_2BC66EA3.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/4722.image_5F00_2BC66EA3.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/0005.012814_1852_HowtoSetupa29.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/0005.012814_5F00_1852_5F00_HowtoSetupa29.png" alt="" border="0" /></a>&nbsp;</p>
<p>Make sure you choose "Create a new cloud service" in the Cloud Service list box</p>
<p>Choose a DNS name for the cloud service</p>
<p>Set the Virtual Network to the one we created in part 1, "DemoVNet"</p>
<p>Set the subnet to the WAF subnet we created in part 1, "Subnet-1"</p>
<p>Click the Next arrow</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/5355.image_2201072B.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/5355.image_5F00_2201072B.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/8400.012814_1852_HowtoSetupa30.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/8400.012814_5F00_1852_5F00_HowtoSetupa30.png" alt="" border="0" /></a></p>
<p>Open TCP port 443 to the WAF by adding the HTTPS endpoint</p>
<p>Click the OK check mark</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/8015.012814_1852_HowtoSetupa31.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/8015.012814_5F00_1852_5F00_HowtoSetupa31.png" alt="" /></p>
<p>Azure will create the virtual machine and start it. Give the WAF VM a several minutes (30 minutes is a safe number) to power up and reach steady state. You can watch its status in the Azure management portal Dashboard for the VM. It will start registering CPU percentage numbers.</p>
<h2>4.4 Provision the Barracuda Virtual Device</h2>
<p>Open a browser and navigate to the WAF administration page.&nbsp; It will be the DNS name for the VM's cloud service you just specified above.&nbsp; In my example figure, it would be <a href="https://omtaDemoWAF.cloudapp.net">https://omtaDemoWAF.cloudapp.net</a>. There is a technical note on Barracuda's site that the SSL administration site may not be accessible while booting (see <a href="https://techlib.barracuda.com/display/BWAFv76/Barracuda%2BWeb%2BApplication%2BFirewall%2BVx%2BQuick%2BStart%2BGuide%2B-%2BWindows%2BAzure">https://techlib.barracuda.com/display/BWAFv76/Barracuda%2BWeb%2BApplication%2BFirewall%2BVx%2BQuick%2BStart%2BGuide%2B-%2BWindows%2BAzure</a>). If you think this is an issue, add port 8000 as an endpoint to the cloud service you just created in the previous step via the Azure portal, then access the administration site in clear HTTP on port 8000 (in my example, that would look like <a href="https://omtaDemoWAF.cloudapp.net:8000">https://omtaDemoWAF.cloudapp.net:8000</a>) to get a status on the device.</p>
<p>Since this is the first time you've accessed the WAF, the admin page will look like the figure below.</p>
<p>Enter your license token from Barracuda</p>
<p>Enter the DNS domain your applications will be in (contoso.net or whatever)</p>
<p>Click Provision</p>
<p><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/49/16/metablogapi/6330.image_3780D737.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-49-16-metablogapi/6330.image_5F00_3780D737.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/6862.012814_1852_HowtoSetupa32.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/6862.012814_5F00_1852_5F00_HowtoSetupa32.png" alt="" border="0" /></a></p>
<p>Close your browser and wait a several minutes for the WAF to provision itself.&nbsp; It will restart itself and eventually come back up.</p>
<p>Now you're ready for the next part, exposing the application.</p>
<h1>5 Exposing the Application</h1>
<p>Finally we will create the link from the internet through the WAF to the application</p>
<h2>5.1 Create a WAF Virtual Service</h2>
<p>Open a browser and navigate to the WAF administration page again, just as in part 3.</p>
<p>This time you'll receive a login page, type the default administrative user for the Barracuda</p>
<p>Type the default password for the admin user</p>
<p>Click Login</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/3731.012814_1852_HowtoSetupa33.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/3731.012814_5F00_1852_5F00_HowtoSetupa33.png" alt="" /></p>
<p>Once logged into the WAF administrative portal, click on the Basic tab</p>
<p>Click on Services in the ribbon</p>
<p>You'll see a page that lists the WAF services and a section to add a virtual service.&nbsp; A WAF service is the link between traffic coming in to the WAF and your PaaS application.&nbsp; Remember that the PaaS application was created with an internal endpoint, meaning that it is firewalled off from the internet.</p>
<p>Type a name for your virtual service in the Service Name text box</p>
<p>Type the IP address of the WAF in the Virtual IP Address text box.&nbsp; Since the WAF is the first device in Subnet-1 (the WAF subnet), it will have an address of 172.16.1.4.&nbsp; Azure addresses are DHCP addresses, but the first one it hands out within a given subnet is always the 4th one from the beginning of that network's range.</p>
<p>Type 81 in the Port text box</p>
<p>Type the IP address of the first PaaS role server in the Real Servers text box.&nbsp; It will be 172.16.2.4, because it is the first server in Subnet-2 (the application subnet).</p>
<p>Click the Add button</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/1425.012814_1852_HowtoSetupa34.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/1425.012814_5F00_1852_5F00_HowtoSetupa34.png" alt="" /></p>
<p>We have now created a Virtual Service on the WAF that tells it to inspect traffic coming in from the internet on port 81, check it against policy, and if it complies, pass it to the backend PaaS application server on port 80.&nbsp; The only reason I've chosen port 81 is to show that you don't need to select the same port that the application exposes.&nbsp; You can choose port 80 for the virtual service, and I'll leave that is an exercise for the reader.</p>
<p>Your Services page should look similar to the figure below</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/5228.012814_1852_HowtoSetupa35.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/5228.012814_5F00_1852_5F00_HowtoSetupa35.png" alt="" /></p>
<h2>5.2 Open the WAF Virtual Service to the Internet</h2>
<p>Next, we need to tell Azure to allow traffic from the internet to the WAF.&nbsp; This is done by adding port 81 to the WAF cloud service endpoints.</p>
<p>In the Azure management portal, click on Virtual Machines in the left pane</p>
<p>Click on the WAF virtual machine name</p>
<p>Click on Endpoints near the top middle</p>
<p>Click on the Add button on the bottom near the middle</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/2570.012814_1852_HowtoSetupa36.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/2570.012814_5F00_1852_5F00_HowtoSetupa36.png" alt="" /></p>
<p>Choose Add a Stand-Alone Endpoint</p>
<p>Click the Next arrow&nbsp;</p>
<p>Give the endpoint a name by typing it in the Name text box</p>
<p>Choose TCP as the protocol</p>
<p>Set public port to 81</p>
<p>Set private port to 81</p>
<p>Click on the check mark button to add the endpoint</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/4667.012814_1852_HowtoSetupa37.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/4667.012814_5F00_1852_5F00_HowtoSetupa37.png" alt="" /></p>
<p>You should now see a list of endpoints similar to the figure below.&nbsp; These are the ports that Azure is allowing in from the internet to your WAF virtual machine.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/1524.012814_1852_HowtoSetupa38.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/1524.012814_5F00_1852_5F00_HowtoSetupa38.png" alt="" /></p>
<p>At this point, you should be able to access your application using the DNS name you gave to the cloud service hosting the WAF IaaS machine.&nbsp; In this demo, we used omtaDemoWAF, so the URL would be <a href="https://omtaDemoWAF.cloudapp.net:81/default.aspx">https://omtaDemoWAF.cloudapp.net:81/default.aspx</a>.</p>
<p><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/metablogapi/8461.012814_1852_HowtoSetupa39.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49-metablogapi/8461.012814_5F00_1852_5F00_HowtoSetupa39.png" alt="" /></p>
<p>Congratulations!</p>
<h1>6 Load Balancing and Fault Tolerance</h1>
<p>Now that you've learned the basics of operation, you can move on to create a fault tolerant, load-balanced system. You can cluster Barracuda virtual devices and place multiple PaaS roles in the WAF service you created in section 5.1.</p>
<p>At the time of this writing, the documentation for clustering virtual devices was not released, but you can follow the instructions for the physical devices here: <a href="https://techlib.barracuda.com/display/BWAFV76/How+to+Set+Up+a+High+Availability+Environment+with+Two+Barracuda+Web+Application+Firewalls">https://techlib.barracuda.com/display/BWAFV76/How+to+Set+Up+a+High+Availability+Environment+with+Two+Barracuda+Web+Application+Firewalls</a></p>
<p>You can ignore the LAN, MGMT, and bridge mode references in the above link (LAN and MGMT interfaces are the same on the virtual device).</p>
<p>Once set up, configuration amongst systems can be synchronized in an active/active cluster of two or more WAF nodes.&nbsp; Configuration changes made to one device in the cluster are propagated to all other devices in the configuration cluster.</p>
<p>The following settings are not propagated between clustered WAFs. These must be manually configured on each WAF in the cluster if they had not already been set at the time of clustering.</p>
<ul>
<li>WAN IP Address/Netmask/Gateway</li>
<li>System DNS Servers</li>
<li>System Hostname</li>
<li>Cluster Shared Secret</li>
<li>System Time Zone</li>
<li>System IP/Password/Serial</li>
<li>HTTP/HTTPS Port (must be the same value on all machines)</li>
<li>HTTPS Certificate/Settings</li>
<li>Appearance Name, Logo, or URL</li>
<li>Link monitoring settings</li>
<li>Remote Support option</li>
<li>NIC Speed/Duplex settings</li>
</ul>
<p>With respect to PaaS roles, just as you added the first PaaS role to the WAF service in section 5.1, you can add others. The process can be automated since the WAF has a REST API. You can (and I have) write code to the OnStart method of the PaaS role that will add it to the WAF service when the role starts. Since our design placed the WAF(s) are in a specific subnet and Azure always assigns the fourth IP in the subnet address range to the first device (in our walkthrough, the first WAF will always be assigned 172.10.1.4), you could add configuration settings to the PaaS roles so they can find the first WAF and add themselves to a known WAF service.</p>
<p>Conversely, you could write and add code to the PaaS role's OnStop method to remove the role from the WAF service if it is stopped.</p>
<p>Thank you for your time and I hope this information has helped you open up for business with your data protected.</p>]]></content:encoded>
    </item>
    <item>
      <title>New Windows Azure Network Security Whitepaper Available</title>
      <link>https://docs.microsoft.com/archive/blogs/msftashwin/new-windows-azure-network-security-whitepaper-available</link>
      <pubDate>Tue, 17 Dec 2013 10:46:00 GMT</pubDate>
      <dc:creator><![CDATA[Ashwin Palekar - MSFT]]></dc:creator>
      <guid
        isPermaLink="false">https://blogs.msdn.microsoft.com/msftashwin/2013/12/17/new-windows-azure-network-security-whitepaper-available/</guid>
      <description><![CDATA[The new Windows Azure Network Security Whitepaper is now available.
To build and manage solutions...]]></description>
      <content:encoded><![CDATA[<p>The new <strong>Windows Azure Network Security Whitepaper</strong> is now available.</p>
<p>To build and manage solutions in the cloud that comply with industry standards and regulations, IT administrators should understand the security mechanisms within Windows Azure&mdash;both those that are automatic and those that require configuration.</p>
<p>In particular, Windows Azure networking provides the infrastructure necessary to securely connect your virtual machines to one another, as well as bridge between the cloud and your on-premises datacenter.</p>
<p>This white paper seeks to uncover these inner-workings and give insights on how customers can take advantage of the platform&rsquo;s native features to best protect their information assets. The figure below highlights some of what you will see in this white paper.</p>
<p style="padding-left: 30px;">&nbsp;<strong>Figure 1. An example of isolated multi-tier IaaS applications hosted within Windows Azure.</strong><strong></strong></p>
<p style="padding-left: 30px;"><strong><a href="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/2068.diagram.png" original-url="https://blogs.msdn.com/cfs-file.ashx/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49/2068.diagram.png"><img src="https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/01/62/49/2068.diagram.png" original-url="https://blogs.msdn.com/resized-image.ashx/__size/550x0/__key/communityserver-blogs-components-weblogfiles/00-00-01-62-49/2068.diagram.png" alt="" width="612" height="283" border="0" /></a></strong></p>
<p>Download the technical whitepaper from <a title="Windows Azure Network Security Whitepaper" href="https://download.microsoft.com/download/4/3/9/43902EC9-410E-4875-8800-0788BE146A3D/Windows Azure Network Security Whitepaper - FINAL.docx">here</a>.</p>]]></content:encoded>
    </item>
  </channel>
</rss>