Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    External Websites making MSSQL Queries

    Scheduled Pinned Locked Moved Firewalling
    5 Posts 5 Posters 1.6k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H Offline
      heberr
      last edited by

      Hi

      Can somebody please help me figure out a firewall rule that will allow an external website to make calls to my MS SQL Server that is running behind the pfsense 2.0-RELEASE (i386).

      I already create a rule that allow all sources to my MSSQL server running on port 3471 (TCP port), however all queries to the database server are very slow. Any suggestions please? I use a web interface to create the my firewall rules and aliases.

      Thanks

      1 Reply Last reply Reply Quote 0
      • marcellocM Offline
        marcelloc
        last edited by

        Did you create nat rules or only firewall rules?

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • C Offline
          cmb
          last edited by

          I would never open MSSQL to the Internet. At a minimum, make sure you're restricting the source IP, and preferably use a VPN.

          With that said, if it's working at all, your firewall setup is good. Unless maybe you didn't open something else it's expecting and that's causing some kind of timeout, check the firewall logs for blocked traffic from the source IP of the SQL client.

          1 Reply Last reply Reply Quote 0
          • P Offline
            podilarius
            last edited by

            standard MS SQL port is tcp 1433. not allowing that might be causing the timeout.

            1 Reply Last reply Reply Quote 0
            • J Offline
              jasonlitka
              last edited by

              Queries can be slow for a variety of reasons.  You'll want to make sure you are using indexes where ever possible and minimize the amount of data transferred back and forth.  If you are actually connecting through a linked server then things get a lot more complicated as queries that used to run using indexes may not do so anymore (hint: you can't use PART of the primary key in a query and get it to use the clustered index).

              I can break anything.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.