Set Up Network and Firewalls

Depending on the SQL version used, program paths and registry keys change as follows:

  • MSSQL Server 2019 (=MSSQL15)

  • MSSQL Server 2022 (=MSSQL16)

Firewall configuration

As with all IONOS Cloud Windows images, the firewall is turned on automatically. For security reasons, no rules for SQL access over the network have been configured yet. We recommend setting up an incoming firewall rule of type Program if you want to access the SQL instance over the network. To do so, use one of the following options:

Option 1: Create an exception for the data transmission of the following program:

%ProgramFiles%\Microsoft SQL Server\<MSSQLXX>.MSSQLSERVER\MSSQL\Binn\sqlservr.exe

Example for MSSQL Server 2022

%ProgramFiles%\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQL\Binn\sqlservr.exe

Option 2: Create the program rule from the command line:

Note: The IP address used here is only an example; change it according to your configuration.

netsh advfirewall firewall add rule name="SQL-Server" dir=in
action=allow program="%ProgramFiles%\Microsoft SQL Server\<MSSQLXX>.MSSQLSERVER\MSSQL\Binn\sqlservr.exe" enable=yes
remoteip=10.101.101.10/24

TCP/IP binding

For network communication, Microsoft SQL Server images have preconfigured TCP/IP bindings. In some cases, they need to be reconfigured before a newly assigned IP (v4/v6) works properly for SQL.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\<MSSQLXX>.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\Tcp

Example for MSSQL Server 2022:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\Tcp
Registry Editor

Last updated

Was this helpful?