Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
G37Sam
Starting Member
16 Posts |
Posted - 2011-10-25 : 08:34:46
|
Hello,I can access my SQL server perfectly fine over the network (by both server name or static local IP address (194.168.0.254), but I keep getting the following error when trying to access it remotely: quote: 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 - No connection could be made because the target machine actively refused it.) (Microsoft SQL Server, Error: 10061)
I have my router setup to forward ports as follows:TCP/IP is enabled on my server machine and is configured as follow:I also have an exception setup in my windows firewall for sqlservr, and a port open for UDP (not sure if necessary):And finally, tested the port status with an online tool:What exactly am I doing wrong?Sam |
|
steve_r18
Yak Posting Veteran
59 Posts |
Posted - 2011-10-25 : 12:35:06
|
Have you confirmed the netmask of the local router? Confirm that they can even communicate first from either direction. At this point it's tough to tell whether its an incorrect network setting or a security setting.(You would have had to enabled ICMP to test this way)Looking at it more closely. You have the router gateway being used (192.168.0.254), but that's only your gateway, and not that of the actual IP you are being assigned by your ISP. There's nothing you have given the settings as an identifier. Otherwise anyone could connect.Steve |
|
|
G37Sam
Starting Member
16 Posts |
Posted - 2011-10-25 : 17:08:31
|
quote: Originally posted by steve_r18 Have you confirmed the netmask of the local router? Confirm that they can even communicate first from either direction.
Can you please elaborate on how I can do that?quote: At this point it's tough to tell whether its an incorrect network setting or a security setting.(You would have had to enabled ICMP to test this way)
I'll look into that, thanksquote: Looking at it more closely. You have the router gateway being used (192.168.0.254), but that's only your gateway, and not that of the actual IP you are being assigned by your ISP. There's nothing you have given the settings as an identifier. Otherwise anyone could connect.Steve
No, 192.168.0.254 is only my server's local IP. I have my router setup to forward external connections to it (as shown in the first picture)Sam |
|
|
steve_r18
Yak Posting Veteran
59 Posts |
Posted - 2011-10-26 : 14:23:27
|
quote: Have you confirmed the netmask of the local router? Confirm that they can even communicate first from either direction.Can you please elaborate on how I can do that?
This part actually isn't relevant until you satisfy the IP that is outgoing from your remote access point (not 192.168.0.254). Again, if my assumption is correct, your SQL server sits at 194.168.0.254. Your remote network is on the 192.168.0.254 network. You have port forwarding FROM your SQL server to your remote network (that's what I'm understanding) as you claimed your static local IP was 194.168.0.254. Both of those addresses are gateway addresses. Now the 192.168.0.254 is the gateway address from your router but not your ISP. It's hard to explain to a T exactly how the routing works but when you start talking to something on 'the internet' and it needs to reply, it asks where it came from...but it doesn't say it came from 192.168.0.254 it would say it came from the ISP define IP you have. Then when it got to your ISP address (lets say it's 70.10.10.1) that would then say, well I got this from 192.168.0.254 then forward it to the exact IP address of the machine that the request came from. In this case you've specified that anything from 194.168.0.254 be forwarded from your router. That part is fine. On your SQLserver you need to specify the actual address the 'packets' are being sent from. When traffic leaves your local network of 192.168.0.254 your ISP controls ALL the routing from there to where ever. If you were to remove your router, and connect directly to your computer you'd see you'd get a completely different address. For that matter, that address is likely on one of the status pages of your router. Take a look and use that address on the SQLserver configuration page. Steve |
|
|
G37Sam
Starting Member
16 Posts |
Posted - 2011-10-26 : 18:54:34
|
Thanks for your prompt response SteveLet me try and clarify with my fair networking understanding. My SQL Server sits on 194.168.0.254 (set it to have a static IP to avoid the whole dynamic IP mess). The routers IP address locally is 194.168.0.100 (useless here?) and the IP given to us by our ISP (WAN IP?) is 82.XX.XX.XX which I believe is also known as the external IP. This 82.XX.XX.XX is the one I use to access the server remotely.Now, I have the router configured to forward external connections to it from port 1433 to 194.168.0.254quote: On your SQLserver you need to specify the actual address the 'packets' are being sent from.
And how could that be achieved?Again, greatly appreciate your help on this SteveSam |
|
|
steve_r18
Yak Posting Veteran
59 Posts |
Posted - 2011-10-27 : 08:41:26
|
Ok, so now I'm confused a litle bit. Where is the 192... address coming from? I see it being used above for the services settings. It's not the SQL server network...Steve |
|
|
|
|
|
|
|