How do I configure SQL Server 2005 to accept a connection to a private or internal IP address on a private network?
I’m in unfamiliar territory, but here’s the scenario:
I have an application server and a database server, and both are on a private network. How do I allow connections from my app server to the database server using an internal (or private IP if that’s the same thing) IP instead of a WAN IP in the connection string? I apologize if my terminology is wrong or confusing, but I’m at a loss and need to get rid of the Error: 40 named pipes error that’s been plaguing me. Thanks for all of you help.
Ensure SQL Server is listening on the private IP using SQL Server configuration Manager.
- Expand SQL Server Network
Configuration - select the instance
- On the right hand right-click the
TCP/IP protocol - Select Properties
- Ensure your private IP in the list
is Enabled. Example is below (the xxx should be a real IP address)

Ensure it’s using the private IP to connect to the server.
Do a traceroute to the db from the web server and see what path it takes. Does it go via the private IP? If your webserver is multi-homed, you may need to add in some statics routes with the ROUTE -p ADD command to ensure it travels via the private network to get to the database server.
To solve the named pipes error, check the following:
- That the TCP/IP in SQL Server
configuration Manager is enabled - That windows/network firewalls are
not blocking your web server from
connecting to your db server for SQL
(default instance is TCP port 1433) - That Allow Remote Connections is
turned on for SQL Server
Check more discussion of this question.
Related posts:
- Should I ever configure a host with a public IP address to accept traffic from a private IP address?
- How to allow TCP connection over the network to SQL Server 2008 Express?
- Native client connection from IIS to SQL Server 2005 through firewall takes over 30 seconds
- SQL Server 2005 Connection Issue
- How do I configure Windows Server 2008 R2 to be a forward proxy for my private network?





