Problem connecting from outside the lan

Hi all,

I have SQL Server 2005 Express running on a Server 2003 server.
I *think* that I have remote connections enabled correctly as i can connect to the db from any of the machines on the LAN via the server name or it's ip address.

i need to be able to connect to the db from outside the LAN - ie from home, or on the road, using my router's ip address.

i have opened a port in my routers firewall and forwarded that to the ip of the server.
The browser service is running, and remote connections are enabled via TCP/IP and NamedPipes

If I try using my program, which works if i use the internal 192.168.1.x address or the server name in the connection string, i get the following:

System.Data.SqlClient.SqlException: An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: TCP Provider, error: 0 - No connection could be made because the target machine actively refused it.)

i have tried using SQL Server Management Express also using

and i get the same error - but i can connect using the and server name.

what am i missing?


Who is Participating?
Aneesh RetnakaranConnect With a Mentor Database AdministratorCommented:
can you check whether SQL Browser is running as i mentioned here
sgaggerjAuthor Commented:
Yup - it's running.

I figured out what was wrong.  Mostly my stupidity.

1) I was trying to use Windows Authentication.  <- stupidity
2) I didn't change the security of the server to allow Windows or SQL security

Once i used the correct account and changed the security options, i can connect no problems now.

i'll give someone the points if you can tell me how to go about locking the system down so that someone who knows my ip and port cant (easily) get in

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.