Accessing an instance of SQL Server through NAT

I am trying to access SQL Server, which is displayed through IP NAT mapping. All ports are open. I do not know the details of NAT, if appropriate, since it is somewhere else in the company hidden in a bunch of red tape.

Here is what I understood. When you try to access a named instance of SQL Server, the client asks which port the named instance is running on. If I am RDP in SQL Server, I can use netstatto find out the port of this instance and successfully connect through the firewall. However, connecting through the instance name does not work. I assume that the server at some point responds to the internal IP address, and the client uses this.

Does anyone know if this is true, and is there a way around it?

+5
source share
2 answers

The discovery of the instance port listening protocol is subject to the SQL Server Browser service . This uses UDP to 1434. When forwarding NAT to UDP 1434, your client should be able to interact with SQL Server Browser Service (if the SQL Server UDP response packet can reach the client, large if), but even successful interaction will put your client in a bottleneck: now that he knows the dynamic listening port of SQL Server, how does he reach it? NAT will have to dynamically forward the port selected by SQL Server, or it will have to forward all ports.

, SQL Server , , . . SQL Server TCP- . NAT . . 1333, , NAT - , 1433 - .

+6

SQL Server. SQL Server Network Configuration -> Protocols for <named instance> -> TCP/IP -> Properties.

enter image description here

. ( , Test, 1492):

... Server='Test,1492'; ...

+3

All Articles