{"id":6738,"date":"2016-05-02T12:00:58","date_gmt":"2016-05-02T12:00:58","guid":{"rendered":"http:\/\/www.top-password.com\/blog\/?p=6738"},"modified":"2016-05-02T12:05:38","modified_gmt":"2016-05-02T12:05:38","slug":"configure-windows-firewall-to-allow-sql-server-access","status":"publish","type":"post","link":"https:\/\/www.top-password.com\/blog\/configure-windows-firewall-to-allow-sql-server-access\/","title":{"rendered":"2 Ways to Configure Windows Firewall to Allow SQL Server Access"},"content":{"rendered":"<p>By default, Windows Firewall doesn&#8217;t allow inbound \/ outbound requests for SQL Server. If you try to connect to a SQL Server instance from network, you might get the error saying &#8220;The server was not found or was not accessible&#8221;. In this tutorial we&#8217;ll show you 2 ways to configure Windows Firewall to allow SQL Server access.<\/p>\n<p><strong>Method 1: Allow SQL Server Access Through Control Panel<\/strong><\/p>\n<ol>\n<li>Open Control Panel in Large icons or Small icons view, click on <strong>Windows Firewall<\/strong>.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/windows-firewall.png\" alt=\"windows-firewall\" width=\"533\" height=\"308\" class=\"alignnone size-full wp-image-6740\" \/><\/p>\n<\/li>\n<li>Click the link &#8220;<strong>Allow a program or feature through Windows Firewall<\/strong>&#8221; on the left of window.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/allow-app-through-firewall.png\" alt=\"allow-app-through-firewall\" width=\"600\" height=\"390\" class=\"alignnone size-full wp-image-6741\" \/><\/p>\n<\/li>\n<li>You will now see a list with all the apps which are allowed to communicate through the Windows Firewall. To change the rules, you need to click the <strong>Change Settings<\/strong> button. The list of rules will no longer be gray and you will be able to edit it.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/change-firewall-settings.png\" alt=\"change-firewall-settings\" width=\"600\" height=\"504\" class=\"alignnone size-full wp-image-6742\" \/><\/p>\n<\/li>\n<li>Click the &#8220;<strong>Allow another program&#8230;<\/strong>&#8221; button.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/add-another-program.png\" alt=\"add-another-program\" width=\"600\" height=\"504\" class=\"alignnone size-full wp-image-6743\" \/><\/p>\n<\/li>\n<li>From the &#8220;Add a Program&#8221; window, click the <strong>Browse<\/strong> button.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/browse-program.png\" alt=\"browse-program\" width=\"393\" height=\"409\" class=\"alignnone size-full wp-image-6744\" \/><\/p>\n<\/li>\n<li>Navigate to the installation path for your SQL Server instance and select <em>sqlservr.exe<\/em>, and click <strong>Open<\/strong>. In my example, the location is <code>C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\Binn\\sqlservr.exe<\/code>.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/sqlserv.png\" alt=\"sqlserv\" width=\"600\" height=\"417\" class=\"alignnone size-full wp-image-6745\" \/><\/p>\n<\/li>\n<li>You&#8217;ll back to the &#8220;Add a Program&#8221; window and see SQL Server is added to the list. Click the <strong>Add<\/strong> button.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/add-sql-server.png\" alt=\"add-sql-server\" width=\"393\" height=\"409\" class=\"alignnone size-full wp-image-6746\" \/><\/p>\n<\/li>\n<li>SQL Server now appears in the list of Allowed programs and features. You can check any of the location types: private or public. When done, press <strong>OK<\/strong>.\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/allowed-program.png\" alt=\"allowed-program\" width=\"600\" height=\"504\" class=\"alignnone size-full wp-image-6747\" \/><\/p>\n<\/li>\n<\/ol>\n<p><strong>Method 2: Allow SQL Server Access Through Command Prompt<\/strong><\/p>\n<ol>\n<li>\nOpen an elevated Command Prompt.<\/li>\n<li>\nYou can run the <strong>Netsh advfirewall<\/strong> command to open all ports for SQL Server connections. Assuming the path of your SQL Server service is <i>C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\Binn\\sqlservr.exe<\/i>, copy \/ and paste the following commands in the Command Prompt, press Enter after each.<\/p>\n<p><code>netsh advfirewall firewall add rule name=\"SQL Server TCP\" protocol=tcp dir=in action=allow program=\"C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\Binn\\sqlservr.exe\" enable=yes profile=any localip=any localport=any remoteip=any remoteport=any<\/code><\/p>\n<p><code>netsh advfirewall firewall add rule name=\"SQL Server UDP\" protocol=udp dir=in action=allow program=\"C:\\Program Files\\Microsoft SQL Server\\MSSQL10.SQLEXPRESS\\MSSQL\\Binn\\sqlservr.exe\" enable=yes profile=any localip=any localport=any remoteip=any remoteport=any<\/code><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.top-password.com\/blog\/wp-content\/uploads\/2016\/05\/advfirewall.png\" alt=\"advfirewall\" width=\"600\" height=\"233\" class=\"alignnone size-full wp-image-6748\" \/><\/p>\n<\/li>\n<li>\nWhen it&#8217;s done, you&#8217;ve successfully opened up all ports to allow SQL Server access through Windows Firewall.\n<\/li>\n<\/ol>\n<!-- AddThis Advanced Settings generic via filter on the_content --><!-- AddThis Share Buttons generic via filter on the_content -->","protected":false},"excerpt":{"rendered":"<p>By default, Windows Firewall doesn&#8217;t allow inbound \/ outbound requests for SQL Server. If you try to connect to a SQL Server instance from network, you might get the error saying &#8220;The server was not found or was not accessible&#8221;. In this tutorial we&#8217;ll show you 2 ways to configure Windows Firewall to allow SQL [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,10,1894,3,39],"tags":[2683,2682],"class_list":["post-6738","post","type-post","status-publish","format-standard","hentry","category-others","category-tips-tricks","category-windows-10","category-windows-7","category-windows-8","tag-allow-sql-server-through-firewall","tag-configure-windows-firewall-for-sql-server"],"_links":{"self":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/6738","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/comments?post=6738"}],"version-history":[{"count":6,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/6738\/revisions"}],"predecessor-version":[{"id":6753,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/posts\/6738\/revisions\/6753"}],"wp:attachment":[{"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/media?parent=6738"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/categories?post=6738"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.top-password.com\/blog\/wp-json\/wp\/v2\/tags?post=6738"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}