0

We have a small network behind a firewall (WatchGuard XTM 2 series) and network switch. On our network we have multiple instances of SQL server, but 1 in specific that I would like to be able to access remotely from our website. We have a static IP address from our ISP and then all the machines on the network have a locally assigned dynamic IP address. When trying to connect to the database from outside our network how do I get the request to be directed to the proper machine / SQL instance? Is it a parameter in my connection string or something in my firewall?

A few things to rule out:

1) The firewall is allowing access from the website to our network. I added the site's IP and opened up port 1433. Also, when trying to connect and monitoring the firewall no exceptions come up as they did before I added the proper IP address.

2) Remote connections on the SQL server has been setup and enabled. I've done a lot of reading up on remote connections and I am sure it has been setup properly.

I am currently getting this error message on my site:

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.)

dfarney
  • 55
  • 1
  • 7
  • This is more of a ServerFault.com question – cjk Feb 01 '11 at 17:13
  • Agree with ck. Basically, your site is now pointing at your external IP. As you say, your servers use dynamic IPs internally. So, your firewall will need to do this: incoming connection to port 1433 -> forward to internal SQL Server. If the firewall is also your DHCP server, then it should be able to perform this forwarding. Otherwise, you may need to consider a static IP for your database server so that the firewall can be set up with a static forward to the correct internal IP. A good sys admin should be able to set this up for you in not much time. Good luck! – pelazem Feb 01 '11 at 17:22
  • One more note. Without knowing the details, you are aware of the potential security risks of opening up an inbound port on your firewall to a well-known RFC port (1433)? Hopefully you are tunneling between your ISP and your firewall, or have implemented other security measures to prevent others from exploiting this hole. – pelazem Feb 01 '11 at 17:25
  • Before this moves... change the port away from 1433, using 1433 is just asking for grief (its known and therefore targeted) – Murph Feb 01 '11 at 17:26

1 Answers1

0

The Server parameter of the ConnectionString indicates what server to connect to. Assign an ip address or URL to the server that you want to access and put that in your connection string.

smartcaveman
  • 41,281
  • 29
  • 127
  • 212