<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Azure Support &#187; Firewall</title>
	<atom:link href="http://www.azuresupport.com/tag/firewall/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.azuresupport.com</link>
	<description>Windows Azure Tutorial</description>
	<lastBuildDate>Mon, 25 Apr 2011 10:32:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1</generator>
		<item>
		<title>SQL Azure Firewall &#8211; Tutorial</title>
		<link>http://www.sqlazureperformance.com/2010/sql-azure-firewall-tutorial/</link>
		<comments>http://www.sqlazureperformance.com/2010/sql-azure-firewall-tutorial/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 02:06:36 +0000</pubDate>
		<dc:creator>azuresupport</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SQL Azure]]></category>

		<guid isPermaLink="false">http://www.azuresupport.com/?p=149</guid>
		<description><![CDATA[SQL Azure comes with a built-in  firewall, through which all connection attempts to a SQL Azure database must pass. By  default the firewall blocks all access to the database even from your own Azure applications. The first step in configuring the firewall is therefore to navigate to SQL Azure in the online Azure developer portal, [...]]]></description>
			<content:encoded><![CDATA[<p>SQL Azure comes with a built-in  firewall, through which all connection attempts to a SQL Azure database must pass. By  default the firewall blocks all access to the database even from your own Azure applications. The first step in configuring the firewall is therefore to navigate to SQL Azure in the online Azure developer portal, select the Firewall tab and check &#8220;Allow Microsoft Services access to this server&#8221; . This will enable other Azure services in your app to communicate with SQL Azure (NB this isnt necessary if you are using the SQL Azure database with non-Azure apps). This will add an entry for MicrosoftServices as a firewall rule.</p>
<p><img class="alignnone size-full wp-image-312" title="SQL Firewall Settings 1" src="http://azuresupport.com/wp-content/uploads/2009/12/Picture-21.png" alt="SQL Firewall Settings 1" width="434" height="143" /></p>
<p>This will be sufficient for your Azure apps to run bu you will also need to access the server for development purposes and so additional rules are required. Simply click Add Rule, name the rule and set the IP address range for the rule. In this example I have set an extremely strict rule to only allow my IP access to the database. To turn off the firewall enter the range 0.0.0.0 to 255.255.255.255 but this is obviously not recommended.<br />
Bear in mind your local development environment may also have a firewall and to connect to the SQL Azure database you must have enable TCP communication on TCP port 1433.</p>
<p><img class="alignnone size-full wp-image-314" title="SQL Azure Firewall 3" src="http://azuresupport.com/wp-content/uploads/2009/12/Picture-31.png" alt="SQL Azure Firewall 3" width="468" height="291" /></p>
<p><br class="spacer_" /></p>
<p>The firewall can also be manipulated by executing TSQL against the Master database (you will obviously have to configure a firewall rule allowing a connect from the source of the TSQL first).</p>
<h3>View Firewall Rules</h3>
<p>The  <code><strong>sys.firewall_rules</strong></code> view contains the ?? <code>id, name, start_ip_address, end_ip_address, create_date and modify_date </code> for the firewall rules.</p>
<pre lang="sql">--Select all firewall rules
select * from sys.firewall_rules</pre>
<p><br class="spacer_" /></p>
<h3>Add/Update Firewall Rules</h3>
<p>Use the <code><strong>sp_set_firewall_rule</strong></code> stored procedure to add or update firewall rules, with <code> name, start_ip_address, end_ip_address as the parameters.</code></p>
<pre lang="sql">--Create a firewall rule
exec sp_set_firewall_rule N'azureSupDev','0.102.129.120','0.102.130.110'</pre>
<p><br class="spacer_" /></p>
<pre lang="sql">--Update a firewall rule
exec sp_set_firewall_rule N'azureSupDev','0.102.129.120','0.102.130.135'</pre>
<p><br class="spacer_" /></p>
<h3>Delete Firewall Rules</h3>
<p>Use the <code><strong>sp_delete_firewall_rule</strong></code> stored procedure to delete firewall rules, with <code> name</code> as the only parameter:</p>
<pre lang="sql">--Delete a firewall rule
exec sp_set_firewall_rule N'azureSupDev','0.102.129.120','0.102.130.135'</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.sqlazureperformance.com/2010/sql-azure-firewall-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

