Blog

All posts tagged 'Firewall'

Check out all of the posts tagged with 'Firewall' below. If you still can't find what you are looking for, try using the search box.

Windows 2008 R2 Firewall with SQL Server

By default, installing SQL Server 2008 R2 on a brand new Windows Server 2008 R2 server does not open the required Windows Firewall port.  I always wonder why they don't give you the option and install to have MS make the changes for you.  At any rate, MS has a tool to "Fix It" but on my Windows Server 2008 R2 it ran but said it didn't apply to my setup. ???? 

You can of course follow Microsoft's KB articles and manually add the Windows Advanced Firewall rules.  For me, a script to do this was the way to go.  Rolly Perreaux had a great post on setting up SQL and he had the script I've been using to open all SQL ports for my Domain profile on SQL servers.  Here's that script.   

SQL Firewall Ports Script

@echo *** OPENING SQL SERVER PORTS ***
netsh advfirewall firewall add rule name="SQL Server (TCP 1433)" dir=in action=allow protocol=TCP localport=1433 profile=domain
netsh advfirewall firewall add rule name="SQL Admin Connection (TCP 1434)" dir=in action=allow protocol=TCP localport=1434 profile=domain
netsh advfirewall firewall add rule name="SQL Service Broker (TCP 4022)" dir=in action=allow protocol=TCP localport=4022 profile=domain
netsh advfirewall firewall add rule name="SQL Debugger/RPC (TCP 135)" dir=in action=allow protocol=TCP localport=135 profile=domain
netsh advfirewall firewall add rule name="SQL Browser (UDP 1434)" dir=in action=allow protocol=UDP localport=1434 profile=domain

@echo *** OPENING ANALYSIS SERVICES PORTS ***
netsh advfirewall firewall add rule name="Analysis Services (TCP 2383)" dir=in action=allow protocol=TCP localport=2383 profile=domain
netsh advfirewall firewall add rule name="SQL Browser (TCP 2382)" dir=in action=allow protocol=TCP localport=2382 profile=domain

@echo *** OPENING WEB SERVER PORTS ***
netsh advfirewall firewall add rule name="Web Server HTTP (TCP 80)" dir=in action=allow protocol=TCP localport=80 profile=domain
netsh advfirewall firewall add rule name="Web Server SSL (TCP 443)" dir=in action=allow protocol=TCP localport=443 profile=domain

Pause

Enjoy!

Popular tags: , ,