skip to Main Content

I was wondering if there is a way to see if a server blocks outgoing connections. I am trying to connect to an external database from a client’s server.

This is the error I get:

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.)

Edit:
I forgot to say I only have access to the plesk control panel. That’s why I was asking if there is a way with asp.net.

2

Answers


  1. The trusty telnet method:

    telnet theserver 1433
    

    If this times out, the server is not listening. If the screen blanks and you can type something, the server is listening and no firewall is blocking the connection.

    In Vista and Windows 7, you have to install telnet as a Windows component from Control Panel -> Programs and Features.

    Login or Signup to reply.
  2. When you say “server”, do you mean the asp.net server, or the SQL server? And are both machines on the same network? Is this hosted?

    Sql Server:

    • They can remove the OPENROWSET functionality, so you can’t connect to remote servers, regardless
    • I doubt they are giving you access to linked servers in a hosted env

    ASP.Net

    • You can try to connect to the other server via a regular connection, and see if that works.
    • Download a tracert component, and use that to try to trace from your server to the remote one.
      • If it dies somewhere inside your network, then that is your answer (it is blocked)
      • If it works, the outbound is open. Doesn’t mean 1433 is open though.
      • If it dies after, not blocked, but maybe the remote is blocking icmp echo
      • Remember to try to tracert to somewhere else that you know works

    It will be hard to tell what is killing the connection on 1433, if you can get to the server using other means. Could be the firewall, their fw, etc.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search