SQL Server Firewall Configuration
Section titled “ SQL Server Firewall Configuration”Ensure secure and reliable connectivity between Nodinite and SQL Server with proper firewall configuration. This comprehensive guide covers all required ports for on-premise SQL Server, Azure SQL Managed Instance, and Always On Availability Groups.
✅ Complete port requirements for Nodinite and SQL Server communication
✅ Separate guidance for on-premise and Azure SQL Managed Instance
✅ Always On Availability Groups (AOAG) firewall configuration
✅ Windows authentication, Kerberos, and MSDTC requirements
✅ Troubleshooting tips for common firewall issues
Overview
Section titled “ Overview”Nodinite components communicate with SQL Server databases for configuration, logging, and monitoring. Proper firewall configuration is essential for reliable operation across different deployment scenarios.
Key Communication Paths
Section titled “Key Communication Paths”- Nodinite Core Services Server → SQL Server — Core Services connect to Configuration and Log Databases
- SQL Server → SQL Server — Linked Servers enable cross-database queries
- Domain Controllers — Kerberos authentication and DNS resolution
Supported SQL Server Deployments
Section titled “Supported SQL Server Deployments”- On-Premise SQL Server — Standalone instances, failover clusters, Always On Availability Groups
- Azure SQL Managed Instance — Fully managed PaaS with near 100% SQL Server compatibility
- Hybrid Scenarios — On-premise Nodinite connecting to Azure SQL Managed Instance via VPN/ExpressRoute
Communication Architecture
Section titled “ Communication Architecture”Nodinite uses a distributed architecture where multiple components communicate with SQL Server databases:
Diagram: the Nodinite Core Services communicate with the Configuration Database and the Log Databases (the Web Client only through the Web API), the Configuration Database reaches the Log Databases through Linked Servers, and Kerberos authentication goes through the domain controllers. On Windows Server, each Core Service is its own IIS web site; the Logging Service also creates the Log Databases, starting with the first one.
On-Premise SQL Server
Section titled “ On-Premise SQL Server”This section covers firewall requirements for on-premise SQL Server deployments, including standalone instances, failover clusters, and Always On Availability Groups.
Communication Overview
Section titled “Communication Overview”Three primary communication paths require firewall configuration:
- Nodinite Core Services Server → SQL Server — All Nodinite Core Services and Web applications
- SQL Server → SQL Server — Linked Servers (when Log Databases are on different instances)
- All Servers → Domain Controller — Kerberos authentication and DNS resolution
Diagram: on-premise SQL Server firewall communication paths, each arrow drawn from the side that opens the connection. The Agent Server hop applies to Monitoring Agents with a Monitoring Database; the SQL Server 1 to SQL Server 2 hop applies only when Log Databases are on another instance, reached through Linked Servers. No rules are needed for hops that stay on one server.
1. Nodinite Core Services Server → SQL Server
Section titled “1. Nodinite Core Services Server → SQL Server”Required for all Nodinite Core Services to connect to the Configuration and Log Databases. The Logging Service also creates new Log Databases over this connection, starting with the first one, so its account needs the SQL Server rights listed in its prerequisites.
This section, the two after it, and SQL Server Browser Service are the one home for the SQL Server, MSDTC, and domain controller ports. The Prerequisites page of each Nodinite component, such as the Logging Service Prerequisites, lists these hops in one short row each and links here. The same rows apply from the Agent Server when a Monitoring Agent uses a Monitoring Database on a remote SQL Server.
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | Core Services Server | SQL Server | TCP | 1433 | SQL Server default instance | Default port. A named instance, or an instance with a changed port, listens on its own static or dynamic port |
| Outbound | Core Services Server | SQL Server | UDP | 1434 | Named instance discovery | Only for named instances without an explicit port. See SQL Server Browser Service |
| Outbound | Core Services Server | SQL Server | TCP | 135 | RPC Endpoint Mapper | Required for MSDTC and some Linked Server operations |
| Outbound | Core Services Server | SQL Server | TCP | 49152–65535 | MSDTC dynamic RPC | Windows default range; restrict it with Restricting Dynamic RPC Port Range. See MSDTC Configuration |
| Inbound | SQL Server | Core Services Server | TCP | 135, 49152–65535 | MSDTC from the SQL Server side | MSDTC opens connections in both directions; response traffic on established connections is allowed by stateful firewalls |
2. SQL Server → SQL Server (Linked Servers)
Section titled “2. SQL Server → SQL Server (Linked Servers)”Required when Nodinite Configuration Database and Log Databases are hosted on different SQL Server instances.
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | SQL Server 1 | SQL Server 2 | TCP | 1433 | SQL Server instance | Or custom port for named instances |
| Outbound | SQL Server 1 | SQL Server 2 | TCP | 135 | RPC Endpoint Mapper | Required for Linked Server queries |
| Outbound | SQL Server 1 | SQL Server 2 | TCP | 49152–65535 | RPC dynamic range | Used by Linked Server operations |
3. All Servers → Domain Controller
Section titled “3. All Servers → Domain Controller”Required for Kerberos authentication, DNS resolution, and Active Directory group membership.
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | Core Services Server | Domain Controller | TCP/UDP | 53 | DNS resolution | Required to resolve SQL Server names |
| Outbound | Core Services Server | Domain Controller | TCP/UDP | 88 | Kerberos authentication | Required for Windows Authentication |
| Outbound | Core Services Server | Domain Controller | TCP/UDP | 389 | LDAP | Active Directory queries, such as group membership of Web Client users |
| Outbound | SQL Server | Domain Controller | TCP/UDP | 53 | DNS resolution | Required for Linked Servers |
| Outbound | SQL Server | Domain Controller | TCP/UDP | 88 | Kerberos authentication | Required for Linked Server security |
| Outbound | SQL Server | Domain Controller | TCP/UDP | 389 | LDAP | Service account validation |
SQL Server Browser Service
Section titled “SQL Server Browser Service”The SQL Server Browser Service (UDP 1434) is required for connecting to named instances without specifying a port number.
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | Core Services Server | SQL Server | UDP | 1434 | Named instance port discovery | Only required if using named instances without explicit port |
When SQL Browser Is Required
Section titled “When SQL Browser Is Required”- ✅ Connecting to named instances:
Server=SQL01\INSTANCE;... - ❌ Not required if specifying explicit port:
Server=SQL01,1435;... - ❌ Not required for default instances (always use port 1433)
Alternative to SQL Browser
Section titled “Alternative to SQL Browser”Instead of opening UDP 1434, you can specify the port explicitly in connection strings:
Server=SQL01\INSTANCE,1435;Initial Catalog=DatabaseName;...Always On Availability Groups (AOAG)
Section titled “Always On Availability Groups (AOAG)”Additional firewall considerations for SQL Server Always On Availability Groups:
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | Core Services Server | AG Listener | TCP | 1433 | Primary replica connection | Or custom listener port |
| Bidirectional | SQL Replica 1 | SQL Replica 2 | TCP | 5022 | Database mirroring endpoint | Default port, can be customized |
| Bidirectional | SQL Replica 1 | SQL Replica 2 | TCP | 1433 | Replica synchronization | Or custom port |
AOAG Firewall Checklist
Section titled “AOAG Firewall Checklist”- ✅ Allow Nodinite → AG Listener on TCP 1433 (or custom listener port)
- ✅ Allow bidirectional communication between all replicas on TCP 5022 (database mirroring)
- ✅ Allow bidirectional communication between all replicas on TCP 1433 (instance port)
- ✅ Ensure DNS resolution for AG Listener name
- ✅ Configure multi-subnet failover in connection strings:
MultiSubnetFailover=True
Common On-Premise Firewall Scenarios
Section titled “Common On-Premise Firewall Scenarios”Scenario 1: Single Server (Simplest)
Section titled “Scenario 1: Single Server (Simplest)”Setup: Nodinite and SQL Server on the same Windows Server
Firewall Rules: ✅ None required for local SQL Server communication
Scenario 2: Two Servers (Most Common)
Section titled “Scenario 2: Two Servers (Most Common)”Setup: Nodinite on Server A, SQL Server on Server B
Required Rules
Section titled “Required Rules”- ✅ Server A → Server B: TCP 1433 (SQL Server)
- ✅ Server A → Server B: TCP 135, TCP 49152–65535 (MSDTC)
- ✅ Server A → Domain Controller: TCP/UDP 53, 88, 389
- ✅ Server B → Domain Controller: TCP/UDP 53, 88, 389
Scenario 3: Multiple SQL Servers (Linked Servers)
Section titled “Scenario 3: Multiple SQL Servers (Linked Servers)”Setup: Nodinite on Server A, Configuration Database on Server B, Log Databases on Server C
Additional Rules
Section titled “Additional Rules”- ✅ Server B → Server C: TCP 1433 (Linked Server queries)
- ✅ Server B → Server C: TCP 135, TCP 49152–65535 (Linked Server RPC)
Scenario 4: AOAG Multi-Subnet
Section titled “Scenario 4: AOAG Multi-Subnet”Setup: Nodinite on Server A, SQL AOAG with replicas on Server B (primary) and Server C (secondary)
Required Rules
Section titled “Required Rules”- ✅ Server A → AG Listener: TCP 1433
- ✅ Server B ↔ Server C: TCP 5022 (mirroring endpoint)
- ✅ Server B ↔ Server C: TCP 1433 (replica sync)
Restricting Dynamic RPC Port Range
Section titled “Restricting Dynamic RPC Port Range”The default Windows dynamic RPC port range (49152–65535) is large. You can restrict it to improve security:
PowerShell commands to restrict RPC range:
# Set RPC dynamic port range to 49152-49162 (10 ports)netsh int ipv4 set dynamicport tcp start=49152 num=10netsh int ipv4 set dynamicport udp start=49152 num=10
# Verify settingsnetsh int ipv4 show dynamicport tcpnetsh int ipv4 show dynamicport udpRestart required: Yes, restart the server for changes to take effect.
Azure SQL Managed Instance
Section titled “ Azure SQL Managed Instance”Azure SQL Managed Instance requires different firewall configuration compared to on-premise SQL Server. Connections are always encrypted (TDS over TLS): TCP 1433 inside the virtual network or through a private endpoint, and TCP 3342 through the optional public endpoint, which also needs your public IP address allowed.
Azure Communication Overview
Section titled “Azure Communication Overview”Two primary communication paths:
- Nodinite Core Services Server → Azure SQL Managed Instance — All Nodinite Core Services
- Nodinite Core Services Server → Azure Infrastructure — DNS resolution
TCP 3342 public endpoint"| AzureSQL Nodinite -->|"TCP/UDP 53"| AzureDNS
Diagram: Azure SQL Managed Instance firewall communication paths from the Core Services server (the Logging Service and Web API) to the Configuration Database and Log Databases; see the Azure SQL firewall documentation for the platform side.
1. Nodinite Core Services Server → Azure SQL Managed Instance
Section titled “1. Nodinite Core Services Server → Azure SQL Managed Instance”Required for all Nodinite Core Services to connect to Configuration and Log Databases hosted in Azure.
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | Core Services Server | Azure SQL MI | TCP | 1433 | TDS (encrypted) to the VNet-local or private endpoint | Recommended path; needs VNet, peering, VPN, or ExpressRoute connectivity |
| Outbound | Core Services Server | Azure SQL MI | TCP | 3342 | TDS (encrypted) to the public endpoint | Only when the public endpoint is enabled on the managed instance |
2. Nodinite Core Services Server → Azure DNS
Section titled “2. Nodinite Core Services Server → Azure DNS”Required for resolving Azure SQL Managed Instance FQDN.
| Direction | Source | Destination | Protocol | Port(s) | Purpose | Notes |
|---|---|---|---|---|---|---|
| Outbound | Core Services Server | DNS Server | TCP/UDP | 53 | DNS resolution | Required to resolve *.database.windows.net |
Azure SQL Managed Instance Firewall Configuration
Section titled “Azure SQL Managed Instance Firewall Configuration”Azure SQL Managed Instance has two firewall layers:
1. Azure SQL Firewall Rules
Section titled “1. Azure SQL Firewall Rules”Configure in Azure Portal under Firewalls and virtual networks:
Option A: Public Endpoint (Internet Access)
Section titled “Option A: Public Endpoint (Internet Access)”Add your Nodinite server's public IP address to Azure SQL firewall rules:
- Navigate to Azure Portal → SQL Managed Instance → Networking
- Under Public endpoint, click Configure
- Add firewall rule with your Nodinite server's public IP address range
Option B: Private Endpoint (VNet Integration) — Recommended
Section titled “Option B: Private Endpoint (VNet Integration) — Recommended”Use Azure Private Link for secure, private connectivity:
- Create Private Endpoint for SQL Managed Instance
- Ensure Nodinite server can reach the Private Endpoint:
- Azure VM: Connect to same VNet or peered VNet
- On-Premise: Connect via VPN Gateway or ExpressRoute
Benefits
Section titled “Benefits”- ✅ No public internet exposure
- ✅ Traffic stays on Azure backbone network
- ✅ No public IP whitelisting required
2. Network Security Groups (NSG)
Section titled “2. Network Security Groups (NSG)”If Nodinite runs on an Azure VM, configure NSG rules:
| Direction | Source | Destination | Protocol | Port | Action |
|---|---|---|---|---|---|
| Outbound | Nodinite VM | SQL Managed Instance | TCP | 1433 (VNet/private endpoint) or 3342 (public endpoint) | Allow |
| Outbound | Nodinite VM | DNS | TCP/UDP | 53 | Allow |
Hybrid Scenarios (On-Premise to Azure)
Section titled “Hybrid Scenarios (On-Premise to Azure)”Scenario: Nodinite on-premise, Azure SQL Managed Instance in Azure
Required Network Connectivity
Section titled “Required Network Connectivity”- VPN Gateway or ExpressRoute connection between on-premise network and Azure VNet
- Private Endpoint for SQL Managed Instance in Azure VNet
- On-Premise Firewall Rules:
- Allow outbound TCP 1433 to Azure VNet IP range
- Allow outbound TCP/UDP 53 for DNS resolution
Recommended Setup
Section titled “Recommended Setup”On-Premise Network → VPN/ExpressRoute → Azure VNet → Private Endpoint → SQL Managed InstanceAzure SQL Managed Instance Checklist
Section titled “Azure SQL Managed Instance Checklist”- ✅ Add Nodinite server's public IP to Azure SQL firewall rules (if using public endpoint)
- ✅ OR configure Private Endpoint for secure connectivity (recommended)
- ✅ Ensure DNS resolution for
*.database.windows.net - ✅ Use
Encrypt=Truein all connection strings (enforced by Azure) - ✅ Configure NSG rules if Nodinite runs on Azure VM
- ✅ For hybrid scenarios, establish VPN/ExpressRoute connectivity
- ✅ Test connectivity:
Test-NetConnection -ComputerName instance.database.windows.net -Port 1433(or-Port 3342for the public endpoint)
Troubleshooting Firewall Issues
Section titled “ Troubleshooting Firewall Issues”Common Symptoms and Solutions
Section titled “Common Symptoms and Solutions”| Symptom | Possible Cause | Solution |
|---|---|---|
| "Cannot connect to SQL Server" | Firewall blocking TCP 1433 | Verify firewall rules allow Nodinite → SQL Server on TCP 1433 |
| "Login failed for user" | Authentication issue, not firewall | Check SQL authentication and Windows Authentication settings |
| Timeout connecting to SQL Server | Firewall dropping packets | Verify all required ports are open, check NSG rules (Azure) |
| "Named Pipes Provider: Could not open a connection" | Named instance without port | Open UDP 1434 OR specify explicit port in connection string |
| Linked Server queries fail | SQL Server → SQL Server firewall blocked | Verify bidirectional SQL Server communication on TCP 1433, 135, dynamic RPC |
| AOAG failover takes 10-20 seconds | MultiSubnetFailover=True not used |
Add MultiSubnetFailover=True to connection strings |
| Azure SQL connection timeout | Public IP not whitelisted | Add public IP to Azure SQL firewall rules |
| Azure SQL "Server was not found" | DNS resolution failure | Verify DNS resolution for *.database.windows.net |
Testing Connectivity
Section titled “Testing Connectivity”Test SQL Server Port (TCP 1433)
Section titled “Test SQL Server Port (TCP 1433)”PowerShell:
Test-NetConnection -ComputerName SQL01 -Port 1433Expected result: TcpTestSucceeded : True
Test SQL Browser (UDP 1434)
Section titled “Test SQL Browser (UDP 1434)”PowerShell:
Test-NetConnection -ComputerName SQL01 -Port 1434Test MSDTC (TCP 135 + Dynamic)
Section titled “Test MSDTC (TCP 135 + Dynamic)”PowerShell:
# Test RPC Endpoint MapperTest-NetConnection -ComputerName SQL01 -Port 135
# Test specific dynamic port (if known)Test-NetConnection -ComputerName SQL01 -Port 49152Test Azure SQL Managed Instance
Section titled “Test Azure SQL Managed Instance”PowerShell:
# Test TDS connectivity (VNet-local or private endpoint)Test-NetConnection -ComputerName myinstance.database.windows.net -Port 1433
# Test TDS connectivity (public endpoint)Test-NetConnection -ComputerName myinstance.public.<dns-zone>.database.windows.net -Port 3342Test DNS Resolution
Section titled “Test DNS Resolution”PowerShell:
# On-Premise SQL ServerResolve-DnsName SQL01
# Azure SQL Managed InstanceResolve-DnsName myinstance.database.windows.netAdvanced Troubleshooting
Section titled “Advanced Troubleshooting”Enable SQL Server Logging
Section titled “Enable SQL Server Logging”Enable SQL Server error log to see connection attempts:
-- Enable login auditing (requires restart)EXEC xp_instance_regwrite N'HKEY_LOCAL_MACHINE', N'Software\Microsoft\MSSQLServer\MSSQLServer', N'AuditLevel', REG_DWORD, 2Log location: C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Log\ERRORLOG
Check Windows Firewall Rules
Section titled “Check Windows Firewall Rules”PowerShell (run as Administrator):
# List all SQL Server firewall rulesGet-NetFirewallRule|Where-Object {$_.DisplayName -like "*SQL*"}
# Check if port 1433 is allowedGet-NetFirewallRule|Where-Object {$_.LocalPort -eq 1433}
# View detailed rule informationGet-NetFirewallRule -DisplayName "SQL Server"|Get-NetFirewallPortFilterMonitor Network Traffic
Section titled “Monitor Network Traffic”Use Wireshark or NetMon to capture network traffic and verify packets are reaching SQL Server.
Filter for SQL Server traffic:
tcp.port == 1433External References
Section titled “ External References”- Configure the Windows Firewall to Allow SQL Server Access
- How to configure RPC dynamic port allocation with firewalls
- Azure SQL Managed Instance connectivity architecture
- MSDTC firewall configuration
Next Steps
Section titled “ Next Steps”Related Topics
Section titled “ Related Topics”- SQL Server Troubleshooting
- Always On Availability Groups
- SQL Server Options
- Configuration Database
- Log Databases
- Agent Database
- Logging Service Prerequisites
- Configuration Database Prerequisites
- Log Database Prerequisites
- To move an existing Nodinite database to the managed instance, see Upload and restore SQL Managed Instance .bak using Azure Blob Storage.