Some accounting, ERP, billing and practice-management products keep their data in Microsoft SQL Server. If your firm runs one, that database holds client ledgers, GST working, payroll and contact details. A default SQL Server instance listens on TCP port 1433, and if that port can be reached from the internet, anyone running a scanner can start guessing passwords against it. This post covers SQL Server port 1433 security: how to find out which port your database really uses, how to close it to the internet, and what Prixl Warden checks.
A note for Tally users first. TallyPrime does not run on SQL Server. It keeps company data in its own files in the Tally data folder, so most of this post applies to you only if you also run other software that uses SQL Server. Tally has its own network port to watch, which we cover further down.
Port 1433, and when it is not 1433
Applications on your staff PCs connect to the database over the network. For a default instance, that connection goes to TCP port 1433. Many small offices do not have a default instance, though. Named instances, including SQL Server Express (the free edition that many accounting packages install), use dynamic ports: they pick a free port each time the service starts. A separate service, SQL Server Browser, listens on UDP port 1434 and tells clients which port to use. Microsoft documents both in Configure the Windows Firewall to allow SQL Server access.
So a check that only looks at 1433 can miss the database entirely. To see what your server is actually listening on, open PowerShell as administrator on the server and run:
Get-NetTCPConnection -State Listen -OwningProcess (Get-Process sqlservr).Id | Select-Object LocalAddress, LocalPort
Get-NetUDPEndpoint -LocalPort 1434 -ErrorAction SilentlyContinue
The first line lists every TCP port the SQL Server process has open. If it shows 1433, you have a default instance (or a named instance set to 1433). If it shows a high number, that is your instance’s port. If the second line prints anything, SQL Server Browser is running on UDP 1434. If Get-Process says it cannot find sqlservr, SQL Server is not running on this machine.
What an attacker can do once they reach it
- Guess SQL logins. Automated tools try thousands of username and password pairs. The built-in
sa(system administrator) login is always tried first. This is the same pattern as brute-force attacks on Windows sign-ins, aimed at the database instead. Failed attempts show up in the SQL Server error log and, with the default login auditing, in the Windows Application log as event 18456. - Log in and run queries directly. With one valid login, guessed or stolen, an attacker can read, change or delete any data that login can reach. People sometimes call this “SQL injection”, but it is not. SQL injection means tricking a website or application into running the attacker’s query. Here the attacker simply signs in to the database, which is worse, because no application stands in the way.
- Run Windows commands. SQL Server has a feature called
xp_cmdshellthat runs operating-system commands from a query. Microsoft disables it by default on new installations, but anyone holding a sysadmin login such assacan switch it back on in a few seconds. A sysadmin login on the database is therefore close to full control of the server. - Copy or encrypt the data. Client records, bank details and passwords stored in the database can be copied out, and database files are a favourite target for ransomware.
How to close it to the internet
1. Check the router first
In most offices the server sits behind the internet router, and nothing from the internet reaches it unless the router has a port-forward (sometimes called “Virtual Server” or “NAT rule”) pointing at it. Log in to the router, or ask your ISP or IT vendor to, and remove any forward for TCP 1433, UDP 1434 or your named instance’s port. A forward like this is often added years ago “so the branch office can connect” and then forgotten. Our Windows Server firewall check shows how to test from outside the office.
2. Scope the Windows Firewall rules to the office network
Staff PCs on the office LAN still need to reach the database, so the goal is not “block everything” but “allow only the office”. List the inbound rules that name port 1433, and any rules that allow the SQL Server program itself (those do not show a port number):
Get-NetFirewallPortFilter -Protocol TCP | Where-Object { $_.LocalPort -eq '1433' } | Get-NetFirewallRule | Format-Table DisplayName, Enabled, Direction, Action
Get-NetFirewallApplicationFilter | Where-Object Program -like '*sqlservr.exe' | Get-NetFirewallRule | Format-Table DisplayName, Enabled, Action
For each enabled inbound allow rule you find, limit it to the local network. Replace the name in quotes with the rule’s DisplayName:
Set-NetFirewallRule -DisplayName "<rule name>" -RemoteAddress LocalSubnet
If you have a named instance, ask your software vendor or IT person to give it a fixed port in SQL Server Configuration Manager (Microsoft’s steps are here). A fixed port is much easier to scope and to check later.
3. Give remote staff a private route, not an open port
If someone working from home needs the accounting software, do not open the database port for them. Give them a private connection to the office instead: Prixl Guard Secure Access, which connects each invited person through an encrypted WireGuard tunnel and needs no router setup or static IP, or a VPN. The port then stays reachable only from the office network and the tunnel.
4. Lock down the logins
- Disable
saonce you have confirmed another login with sysadmin rights works. Disabling it first can lock you out of your own database. The command isALTER LOGIN sa DISABLE;, run in SQL Server Management Studio. - Use Windows Authentication where the application supports it, so there are no separate SQL passwords to guess.
- Use long passwords for any SQL logins that remain: we recommend at least 15 characters, in line with NIST SP 800-63B-4 (2025). A long passphrase is fine.
- Confirm
xp_cmdshellis still off. RunSELECT name, value_in_use FROM sys.configurations WHERE name = 'xp_cmdshell';. A value of 0 means off. If an old application switched it on, ask the vendor whether it is still needed. - Keep SQL Server patched with its cumulative updates, the same way you keep Windows patched.
If you run Tally: port 9000
TallyPrime can act as a server for other programs (Excel reports, add-ons, mobile apps) through its Client/Server and ODBC settings. When that is enabled it listens on a network port, and Tally’s own help says the default is 9000. The same rule applies: never forward it on the router, and keep any Windows Firewall rule for it limited to the office network.
What Prixl Warden checks
Prixl Warden‘s security audit includes a check labelled SQL Server (1433). It warns when an enabled inbound Windows Firewall rule opens port 1433 to any address. If Warden’s own block rule already covers the port, the check passes.
The Hardening tab offers a fix called Port 1433 Open. It is marked as a risky fix, because it disables every inbound allow rule for port 1433, including rules that let office PCs reach the database. Before applying it, Warden shows the warning “Applications connecting to SQL Server on this machine will lose access.” If your staff use the database over the LAN, scoping the rule (step 2 above) is usually the better choice. An applied fix can be undone with Revert under “Previously Applied”. One-click fixes need a paid plan; the trial shows the audit in view-only mode.
Know the limits, too. The 1433 check reads Windows Firewall rules that name port 1433. It does not cover a named instance on a dynamic port, a rule that allows sqlservr.exe as a program, or a forward on your router, so do the manual checks above as well. The Open Ports tab lists every port the server is listening on, including a named instance’s port, and its LAN only button adds a rule that blocks that port from internet addresses. Warden watches Windows sign-ins, not SQL Server’s own logins, so failed sa attempts will not reach you as Warden alerts.
See how the rest of your server measures up across all 29 audit checks. Start your 30-day free trial. No card is needed.
