> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cloud/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cloud/backup-and-storage/images-snapshots/public-images/microsoft-sql-server-images/how-tos/set-up-network-firewalls.md).

# 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 <code class="expression">space.vars.ionos\_cloud</code> 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** to use 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:

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

Example for MSSQL Server 2022

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

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

{% hint style="info" %}
**Note:** The IP address used here is only an example; change it according to your configuration.
{% endhint %}

```bash
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.

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

Example for MSSQL Server 2022:

```bash
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL16.MSSQLSERVER\MSSQLServer\SuperSocketNetLib\Tcp
```

![Registry Editor](https://1737632334-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MifAzdGvKLDTtvJP8sm%2Fuploads%2Fgit-blob-7eedf07f6e0c01167c79409095c86f5a6e563aef%2Fregistry-editor.png?alt=media)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ionos.com/cloud/backup-and-storage/images-snapshots/public-images/microsoft-sql-server-images/how-tos/set-up-network-firewalls.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
