Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 208
  • Last Modified:

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
XX.XXX.XXX.XXX\SQLExpress,2301

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

what am i missing?

tia

J
0
sgaggerj
Asked:
sgaggerj
1 Solution
 
Aneesh RetnakaranDatabase AdministratorCommented:
can you check whether SQL Browser is running as i mentioned here http://sequelserver.blogspot.com/2007/06/under-default-settings-sql-server-does.html
0
 
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



0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now