Thursday, November 22, 2012

SQL 2008 R2 - Specify Port Number

If you want to firewall your SQL 2008 R2 instance, you will need to specify a port number for it to listen on. If you don't, it will be a different port each time the instance is restarted. So any firewall rule specifying a port number will need to be changed. Not practical.

Microsofts instructions on how to change this are here...but they have missed quite an important step, based on the default configuration of SQL 2008 R2:
 http://msdn.microsoft.com/en-us/library/ms177440%28v=sql.105%29.aspx

In SQL Server Configuration Manager | SQL Server Network Configuration | Protocols for | TCP/IP (Properties) | Protocol (Tab)

You need to set the Listen All to No. Otherwise any changes you make on the IP Addresses tab will not take effect. Only the settings under IPAll in the IP Address tab will make any difference.

They also don't tell you what the Active and Enabled fields do on the IP Addresses tab. Click the help button and it will explain it. Basically Active is looking at the OS to see if the IP address is actually in use. Enabled is something you set, it decides if this IP Address will listen at all. Make sure you Set Enabled to Yes on the ones you want to listen on.

No comments: