Connect

Firewall and Port Fixes for Network Printing

Arjun Mehta 10 min read
Office Network Printer Connected To A Wall Data Port
Photo by panumas nikhomkhai on Pexels

Key Takeaways

  • Most “can’t find printer” errors on a home or office network come down to a firewall silently blocking the right ports, not a broken printer.
  • Network printing relies on a small set of well-known ports: 631 (IPP), 9100 (raw/JetDirect), and 5353/UDP (mDNS discovery). Open those and most problems clear.
  • On Windows, turning on File and Printer Sharing and Network Discovery for your private network fixes the majority of firewall issues in a few clicks.
  • A wrong network profile (Public instead of Private) is the single most common hidden cause, and it takes ten seconds to switch.
  • When in doubt, test one layer at a time: firewall off briefly, then port, then discovery, so you know exactly what fixed it.

Your printer worked fine yesterday, and today your computer swears it doesn’t exist. You can ping it, the lights are on, but nothing prints. Nine times out of ten, a firewall or a blocked port is quietly standing in the doorway. I have chased this exact ghost on family laptops and small-office setups more times than I can count, and the fix is almost always calmer than it feels. By the end of this guide, you’ll know which ports network printing needs, how to open them safely on Windows and Mac, and how to test each step so you never have to guess again.

Why a Firewall Blocks Your Printer in the First Place

A firewall’s whole job is to say “no” to traffic it doesn’t recognize. That is good when it stops a stranger on the internet, but it can be overzealous with your own printer. If your computer doesn’t clearly know the printer is a friendly device on a trusted network, it treats the printing conversation like an intruder and drops it.

Two things usually trigger this. The first is a network profile set to Public, which locks down sharing and discovery by design. The second is a security update or new antivirus suite that resets firewall rules and forgets your printer was ever allowed. Neither means anything is broken. It just means the door got locked and nobody handed you the key.

If your printer shows as offline rather than missing entirely, it is worth reading What “Printer Offline” Really Means: A Plain Guide alongside this article, because the two problems can look identical from the outside.

Laptop Network Settings

The Ports Network Printing Actually Uses

You don’t need to become a network engineer, but knowing the handful of ports involved makes every fix faster. Think of ports as numbered doors on a building. Your printer listens at a few specific doors, and your computer knocks on them. If a firewall bricks over one of those doors, the knock goes unanswered.

PortProtocolWhat it does
631TCP (IPP)Internet Printing Protocol, the modern standard most systems use
9100TCP (Raw / JetDirect)Direct raw printing, common on office and network printers
515TCP (LPR/LPD)Older line printer protocol, still used by some drivers
5353UDP (mDNS)Bonjour / auto-discovery so your device can “see” the printer
161UDP (SNMP)Status checks like ink levels and online/offline state

If you only remember three numbers, make them 631, 9100, and 5353. The first two carry the actual print job, and the third is how discovery works so your computer can find the printer without you typing an address by hand.

Tip: Before you touch any port settings, note your printer’s IP address from its front-panel network menu. If you can open that address in a web browser and see the printer’s built-in page, the network path is fine and the firewall on your computer is the likely culprit.

The Fastest Fix: Set the Right Network Profile

Before you go hunting for individual ports, check your network profile. Windows and macOS both behave very differently depending on whether they think you’re on a trusted home network or a coffee-shop hotspot. A Public profile is the number one reason printing quietly fails after an update.

On Windows, open Settings, go to Network and Internet, click your active Wi-Fi or Ethernet connection, and set the network profile type to Private. That single switch re-enables discovery and sharing for that network without weakening protection on any public networks you join later. On a Mac, the equivalent trust comes from allowing incoming connections for the print services rather than a named profile.

Warning: Never disable your firewall permanently to get printing working. Turning it off for a two-minute test is fine, but leaving it off exposes every device on your network. Always turn it back on and fix the actual rule instead.

Step-by-Step: Open Printing Ports on Windows Firewall

This is the reliable, do-it-once path on Windows. It uses the built-in firewall, so you don’t need extra software. Follow it in order, and note the expected result after each step so you can tell where things went right.

  1. Open the Start menu, type Windows Defender Firewall, and press Enter. Expected result: the firewall control panel opens showing your active network.
  2. Click Allow an app or feature through Windows Defender Firewall. Expected result: a list of apps with Private and Public checkboxes appears.
  3. Click Change settings, then scroll to File and Printer Sharing and tick its Private box. Expected result: the checkbox stays checked and the row is no longer greyed out.
  4. Also tick Network Discovery for Private if it is listed, then click OK. Expected result: the window closes and settings save.
  5. If your printer still isn’t found, go back and choose Advanced settings, then Inbound Rules, and click New Rule. Expected result: the New Inbound Rule Wizard opens.
  6. Choose Port, select TCP, and enter 631, 9100, 515 as specific local ports, then allow the connection for the Private profile. Expected result: a named rule appears in the inbound list.
  7. Repeat the rule for UDP with ports 5353, 161. Expected result: both TCP and UDP printing rules are active.
  8. Restart the print job or re-add the printer. Expected result: the printer is discovered and a test page prints.

When I rebuilt a small office’s setup last winter, steps one through four alone fixed four of five machines. Only the one laptop with a heavy third-party security suite needed the manual port rules in steps five through seven. That is the usual ratio, so don’t assume you need the advanced steps until the simple ones fail.

Ethernet Cable Router

Third-Party Antivirus and Security Suites

If you run a separate security suite, it may have its own firewall that overrides Windows entirely. In that case, changing Windows Defender settings does nothing, because the other product is the real gatekeeper. This trips up a lot of people who swear they opened every port and still can’t print.

  • Open your security suite and look for a Firewall or Network Protection section.
  • Find the trusted or allowed devices list and add your printer’s IP address.
  • If there is a “network trust” or “home network” setting, mark your Wi-Fi as trusted.
  • Temporarily pause the suite’s firewall for two minutes and try printing; if it works, you have found your culprit and can add a permanent rule.

Many suites also flag the print spooler or driver as suspicious after an update. Whitelisting the printer by IP is usually cleaner than opening ports one by one, because it trusts the whole conversation with that one device.

Mac and Router-Level Checks

On a Mac

macOS keeps its firewall in System Settings under Network, then Firewall. Turn on Options and make sure printing-related services and the “printtool” or CUPS process are allowed to accept incoming connections. macOS relies heavily on port 5353 for discovery, so if Macs on your network find the printer but Windows machines don’t, mDNS is usually the difference.

At the Router

Occasionally the block isn’t on your computer at all. Features like AP isolation, client isolation, or a guest network can wall devices off from each other so they simply cannot talk. If your phone and laptop can reach the internet but never see the printer, this is worth ruling out. Our guide to 9 Router Settings That Break Printer Wi-Fi walks through each one, and pairing a fixed address using How to Assign a Static IP to Your Printer keeps your firewall rules pointing at the right device forever.

How to Test One Layer at a Time

The reason firewall fixes feel maddening is that people change five things at once and never learn what worked. Test in layers instead. First, briefly disable the firewall and try to print; if it works, you have confirmed the firewall is the issue and can turn it back on. Next, confirm the printer’s web page loads in a browser, which proves the network path. Finally, add the port rules and re-test.

This layered habit turns a frustrating afternoon into a five-minute job. If you want to see how these fixes fit into the bigger picture of connection problems, the pillar guide, The Complete Guide to Printer Connection Problems, ties everything together, and if the printer keeps vanishing after it works, 8 Reasons Your Printer Keeps Dropping Off Wi-Fi covers the follow-on causes. You can read more about how we test these steps on our editorial policy page.

For the underlying concepts, the Internet Printing Protocol overview on Wikipedia is a solid, neutral reference on how IPP and port 631 actually work.

Frequently Asked Questions

Which ports do I need to open for network printing?

For most home and office printers, open TCP ports 631 and 9100 for the actual print jobs, plus UDP port 5353 for discovery. Some older drivers also need TCP 515, and status monitoring uses UDP 161. Opening the first three covers the vast majority of setups without weakening your overall security.

Is it safe to open printer ports on my firewall?

Yes, as long as you open them only for your Private or trusted network and not the Public profile. This lets devices on your own network reach the printer while still blocking outside traffic. Never disable the firewall entirely as a fix; scope the rules to your home network and leave protection on everywhere else.

Why did printing stop working after a Windows update?

Updates sometimes reset your network profile back to Public or clear custom firewall rules. When that happens, discovery and sharing switch off automatically. Setting the network back to Private and re-enabling File and Printer Sharing usually restores everything within a minute, without needing to reinstall the printer or its drivers.

My antivirus has its own firewall. Which one wins?

A third-party security suite usually takes over from Windows Defender, so changing Windows settings has no effect. Open your suite’s firewall section, add the printer’s IP to its trusted list, or mark your Wi-Fi as a trusted network. Pausing the suite briefly to test confirms whether it is the true blocker.

The printer’s web page loads but I still can’t print. Now what?

If the printer’s built-in page opens in your browser, the network path is healthy and the block is on the printing ports specifically. Focus on TCP 631 and 9100 in your firewall’s inbound rules, and confirm the print spooler service is running. Re-adding the printer using its IP address often finishes the job.

Bringing It All Together

Firewall and port problems feel scary because they hide behind vague error messages, but the real fix is almost always small: set the network to Private, allow File and Printer Sharing, and open ports 631, 9100, and 5353 if needed. Test one layer at a time and you’ll pinpoint the cause instead of guessing. Take it slow, keep your firewall on, and your printer will be back in a few quiet minutes. If you’d like a friendly starting point for any connection issue, our complete guide to printer connection problems and the wireless printer setup checklist for any brand are always here whenever you need them.