Solved

MsSQL Server outside a Firewall. What ports? How to setup?

Posted on 2001-07-10
4
248 Views
Last Modified: 2012-05-04
I'm having problems and I don't want someone to tell me to follow the steps on Microsoft's Support info from:
Q269882
Q238949

I've tried them.
I have a SQL server outside the firewall, it's using it's default 1433 port. There's a port open on the firewall in/out for 1433 and listening on 1024 to 65535.

I use the Connection String in my ASP Page like the example. "Provider=SQLOLEDB;Password=password;Persist Security Info=True;User ID=username;Initial Catalog=DBNAME;Data Source=servername;Network Library=dbmssocn"

I'm using the IP Address for the Servername.
When ever I try Conn.Open line in my ASP I get 'Connection Not Open' error.  So I can't figure out if it's something I have to do on the SQL or what other ports I need to open up on the firewall.

Any ideas how I can get this working?
0
Comment
Question by:Helpdesk
  • 2
4 Comments
 
LVL 3

Accepted Solution

by:
gmoriak earned 175 total points
ID: 6274789
I would suggest to set up an ODBC setting on that machine just to get to the point where you can hit test connection.  If this doesn't work, it is likely to get you more info as to why.  If it does work, the problem isn't getting through the firewall.
0
 
LVL 3

Expert Comment

by:sanjaykp
ID: 6276685
1. Check your SQL Server's client network utility and ensure that it is actually listening on TCP/IP and not named pipes. Although within an intranet, pipes work just fine, through your firewall presumably, only IP packets are allowed through.

2. I'd also drop the 'Network Library=dbmssocn' bit from the connection string, since you are actually indicating to the provider that that is the network library it should use.

Cheers
0
 
LVL 3

Expert Comment

by:sanjaykp
ID: 6276698
To answer the last part of you question, what you are doing is just fine. Actually you can ask your network bods to close every port except 1433 (other than those being used for other applications). This should also be the port indicated in the TCP/IP setup in the netowrk client utility.

0
 

Author Comment

by:Helpdesk
ID: 6281230
Well this ended up working. I setup a DSN connection on the webserver, it's not a normal IIS server, it's actually a Linux server running ChilliSoft which supports ASP, so within the Chillisoft configuration we added the DSN connection and I can connect that way, I perferd to use DSN-less but I'm still working on that. At least it works now thanks.  

The ports ended up working correctly after all.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Introduction SQL Server Integration Services can read XML files, that’s known by every BI developer.  (If you didn’t, don’t worry, I’m aiming this article at newcomers as well.) But how far can you go?  When does the XML Source component become …
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question