-1

I've searched for the solution for this problem for days now, found a lot of stuff but none of it worked.

I've got an SQL Server 2012 running on Windows Server 2012. I'm trying to connect to the SQL Server from a client computer remotely (with internet IP), and I keep getting the message 'No connection could be made because the target machine actively refused it.

  • I can connect locally.
  • I opened ports 1433 and 1434 in my firewall
  • I forwarded these ports in my router
  • I tried turning the firewall off
  • I enabled TCP/IP and set the static port to 1433

I STILL cannot connect externally.

Any ideas? I'm at a dead end here.

David Fenko
  • 1
  • 1
  • 1

1 Answers1

1

Are you absolutely sure that there isn't a firewall somewhere between your client and server that's sending back a TCP RST on your connection attempt? A corporate firewall should definitely be blocking that kind of traffic.

Edit:

I'd sniff the traffic on the server side, after verifying with a netstat -a -n | find ":1433" that you're seeing the listener on the server.

If you can't see the incoming SYN from the client then it seems pretty likely you've got something blocking the traffic between the client and the server. It wouldn't be unusual for a consumer ISP to block outbound port 1433 traffic. You might also be hosting the server somewhere that blocks inbound port 1433. Running SQL Server traffic "naked" over the Internet isn't really a best practice (to say the least).

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
  • I have a router that's connected to a modem, I've also opened the ports in that, but other than that no, there is no other firewalls between them. – David Fenko Jul 03 '13 at 22:22
  • I'm doing this only as a purpose of studying, so don't be alarmed, there is no real data behind it. I tried the netstat command and it showed that the port is listening. I also tried changing the port to something else and it still isn't working. – David Fenko Jul 03 '13 at 22:40