Lately I had an error connecting to SQL Server from a remote connection and I had the firewall disabled in both machines and the error I had was:
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.)
All the suggestions pointed me to enabling remote connections in SQL Server, Enable TCP/IP, checking if I was using named instances… but I was able to connect to SQL Server from the remote machine using the command line tool "OSQL /s<machinename,1433> /E" (I used the port to verify that SQL Server was listening from the right port).
Finally I discovered what the problem was. In the client machine I run “cliconfg” to open the following configuration dialog:
Once there, I discovered that I had set up an alias for the remote machine. I deleted that alias so the result was the one in the image and everything started working again.
I hope it helps.