Its always good to have a firewall set up to prevent users from accessing services they shouldn’t have access to, however this usually means that you need to explicitly allow specific ports and protocols to allow users to access services they need to access. One such service would be a database server. Below is a list of protocols and port numbers for some of the more common database engines in use nowadays. Please ensure that access to these services from the internet is blocked.If you need a 3rd party to have access to a specific database, set up some sort of VPN.
Please note that these port numbers are just the defaults, and they can usually be changed to be anything you want (typically with the exception of port numbers for authentication or browser services).
Microsoft SQL Server
|TCP||1433 (SQL Database Engine)|
|UDP||1434 (SQL Browser Service)|
Firebird & Interbase
|TCP & UDP||137-139 (used for authentication – which uses named pipes)|