Windows Server 2008 R2 y los puertos bloqueados para SQL Server 2008 R2

Recientemente en una implementación me encontré con inconveniente: los clientes no podian conectarse a una instancia de SQL Server 2008 R2 bajo Windows Server 2008 R2

Solución: abrir los puertos del Firewall de Windows donde corre el SQL Server.

Para hacerles la vida más fácil en esta ocasión vamos a crear un script, les recomiendo seguir los siguientes pasos:

1. Abrir bloc de notas

2. Copiar y pegar el siguiente código en bloc de notas

 

@echo =========  SQL Server Ports  ===================
@echo Enabling SQLServer default instance port 1433
netsh firewall set portopening TCP 1433 «SQLServer»
@echo Enabling Dedicated Admin Connection port 1434
netsh firewall set portopening TCP 1434 «SQL Admin Connection»
@echo Enabling conventional SQL Server Service Broker port 4022 
netsh firewall set portopening TCP 4022 «SQL Service Broker»
@echo Enabling Transact-SQL Debugger/RPC port 135
netsh firewall set portopening TCP 135 «SQL Debugger/RPC»
@echo =========  Analysis Services Ports  ==============
@echo Enabling SSAS Default Instance port 2383
netsh firewall set portopening TCP 2383 «Analysis Services»
@echo Enabling SQL Server Browser Service port 2382
netsh firewall set portopening TCP 2382 «SQL Browser»
@echo =========  Misc Applications  ==============
@echo Enabling HTTP port 80
netsh firewall set portopening TCP 80 «HTTP»
@echo Enabling SSL port 443
netsh firewall set portopening TCP 443 «SSL»
@echo Enabling port for SQL Server Browser Service’s ‘Browse’ Button
netsh firewall set portopening UDP 1434 «SQL Browser»
@echo Allowing multicast broadcast response on UDP (Browser Service Enumerations OK)
netsh firewall set multicastbroadcastresponse ENABLE

 

3. Guardar el archivo seleccionando otro tipo y marquen todo los tipos de archvos, de esta manera podremos especificar otra extensión distinta a .txt la cual en para este script será .bat y el archivo lo llamaremos PuertosSQLServer.bat

4. Ubicar nuestro archivos PuertosSQLServer.bat y hacer click derecho y ejecutar como administrador (suministrar credenciales de ser necesario).

 

Y listo! intenten conectarse a su instancia y verán lo lo lograran sin problema alguno! ….claro al menos que esté bloqueando el tráfico a nivel de red…..y ese es otro tema totalmente distinto! 🙂

 

Este post tambien aplica a Windows Server 2008 y SQL Server 2008.

 

 

Saludos!

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *