RE: Firewall ports to open

From: Sophie Guo (v-sguo_at_microsoft.com)
Date: 12/27/04

  • Next message: Norbert Meiss: "Re: Application Role"
    Date: Mon, 27 Dec 2004 08:16:58 GMT
    
    

    Hello Rob,

    To communicate with a SQL server through the NetScreen firewall, you need
    configure the firewall, you must allow traffic from *ANY* to 1433, and from
    1433 to *ANY*, where *ANY* is a port greater than 1024.
     
    *ANY* -> 1433
    1433 -> *ANY*
     
    The firewall software should allow this dynamic allocation to occur through
    the use of rules. If it does, you can configure 1433 -> *ANY* established;
    this will dynamically open the response port after a syn followed by a
    syn/ack by way of a statefull packet inspection.

    There is no way to limit the number of source TCP ports used for a SQL
    Server client to connect; this would defeat the purpose of having the
    client allocate a new, unused dynamic port. This is a TCP/IP standard that
    is defined for Winsock applications; this is not a limitation of SQL Server
    client communication.

    If you want you can use firewall to allow connection to SQL server only
    from IIS server. You need enable TCPIP protocol on both server and client
    side.
     
    In addition, a named instance of SQL Server 2000 will use a dynamic
    destination port by default. This port should be changed to a fixed port
    prior to configuring the firewall. The SQL Server Network Utility should be
    used to configure the destination port. See SQL Server Books Online for
    information on how to use the SQL Server Network Utility.
     
    You can refer to the following article regarding how to find the SQL Server
    instance port number:

    INF: How to Connect to an SQL Server 2000 Named Instance with the Previous
    Version's Client Tools (265808)
    http://support.microsoft.com/default.aspx?scid=KB;EN-US;265808

    Otherwise, the client computer would need to open a random UDP port and the
    server UDP port 1434 will be used to send the instance name, and if the
    instance is clustered, the version of the SQL instance, the TCP port number
    that the instance is listening on, and the named pipe that the instance is
    using. However, if the goal is to minimize the number of ports open on the
    firewall, a static port number should be chosen for the default instance
    and any named instance. The client computers would need to be configured to
    connect to a particular ServerName or ServerName instance and specific port
    number.
     
    When SQLMail is started on a SQL Server, a DLL responsible for this creates
    a socket and listens for connections. SQL Enterprise Manager will
    periodically connect to this socket and read a DWORD (32bit) value returned
    from the server. This value determines the state of sqlmail. By default the
    port which sqlmail use is 9127.
     
    I hope above information is helpful.
     
    Sophie Guo
    Microsoft Online Partner Support

    Get Secure! - www.microsoft.com/security

    =====================================================
    When responding to posts, please "Reply to Group" via your newsreader so
    that others may learn and benefit from your issue.
    =====================================================
    This posting is provided "AS IS" with no warranties, and confers no rights.


  • Next message: Norbert Meiss: "Re: Application Role"

    Relevant Pages

    • Re: Connecting to an instance in a cluster
      ... "Geoff N. Hiten" wrote: ... you cannot reuse port numbers. ... Microsoft SQL Server MVP ... That is the port you have to open on the firewall. ...
      (microsoft.public.sqlserver.clustering)
    • Re: Mysterious Port of SQL Server not shown by netstat
      ... If this fails then yoru SQL Server is not listening on 1433. ... port, only ms-sql-s). ... > My query analyzer client from local machine and remote machine> successfully connects to my server. ... There is a jdbc client which wants> to connect at port 1433 that fails saying could not establish network> connection at port 1433. ...
      (microsoft.public.sqlserver.programming)
    • Re: IIS, SQL 2000 & XPs Firewall
      ... You may find it easier to use SQL Server Configuration Manager ... 2008 will be a named instance ... Queries to the Data Engine must go to the port that SQL Server is ... you will have to open those as exceptions in the firewall. ...
      (microsoft.public.sqlserver.connect)
    • Re: Default protocols ..
      ... I checked the default port in the Client Utility on the ... "I checked the default port fort the TCP and it is the good ... And are you in a totally SQL Server 2000 environment? ... I set the TCP has the only one default client protocol with the CLICONFG ...
      (microsoft.public.sqlserver.connect)
    • Re: SQL Server 2008 remote connection problem
      ... Hitchhiker’s Guide to Visual Studio and SQL Server ... default instance of the SQL Server Database Engine listens on TCP port 1433", ... > I was trying to establish a remote connection to SQL Server 2008 from ... The server is running the XP firewall. ...
      (microsoft.public.sqlserver.connect)