...

Welcome to our Support Center

If you have any questions, issues or suggestions, feel free to contact us:

Email: support@flyingbee.com
Skype: flyingbee.software
Telephone: +18303920398

feihone support center map background

How to open TCP ports 5354, UDP port 5353, and TCP port 631 in the firewall on a Windows PC for Bonjour(mDNS), AirPlay or AirPrint

james wei 2024-12-09 17:03:24
Q: I have Bonjour installed on my Windows 7 PC, and the installer appears to have poked all the necessary holes in the Windows firewall. However, I can't ping/print windows-pc.local from my Mac. If I completely disable the Windows firewall, I can. How do I configure Windows firewall to allow Bonjour hostname resolution? A: Sometimes, AirPrint might not play nice with your Windows shared printer because of firewall rules. If that’s the case, you might need to let UDP port 5353 through your firewall. This is usually done by tweaking your firewall settings to allow traffic for UDP port 5353. Check your firewall’s help guide for how to do this.



When configuring the firewall, this step is usually not necessary. However, if you still cannot find the AirPrint printer after completing all the configurations, it's worth checking the Windows firewall settings. The Bonjour networking protocol sends and receives network data packets through UDP port 5353. The Bonjour installer will configure the Windows firewall accordingly during installation on supported systems. But if you have enabled a separate "personal firewall," you need to ensure that UDP port 5353 is open for Bonjour to function properly.



We need to install Bonjour Print Services (Windows), a small tool produced by Apple, on Windows. With the help of its Bonjour printer wizard, we can find and configure Bonjour enabled printers on Windows computers. What we mainly use here is Bonjour's sharing function.
https://support.apple.com/en-us/106380

TCP and UDP ports used by Apple software products
https://support.apple.com/en-us/103229

To modify the Windows firewall settings and open TCP ports 5354, UDP port 5353, and TCP port 631 for Bonjour(mDNS), AirPlay or AirPrint, you can follow these steps:

Open Advanced Security Settings for Windows Firewall

  1. Access through Control Panel:

    • Open "Control Panel".
    • Select "System and Security".
    • Click on "Windows Defender Firewall".
    • In the left navigation pane, click on "Advanced settings".
  2. Access through Search Bar:

    • Type "firewall" in the Windows search bar, then select "Windows Defender Firewall" and open it.
    • Click on "Advanced settings".


Create Inbound Rules to Allow Traffic on Specific Ports

  1. Create an inbound rule for TCP 5354:

    • In the "Windows Firewall with Advanced Security" window, select "Inbound Rules" on the left.
    • In the right action pane, click "New Rule".
    • In the "New Inbound Rule Wizard", select "Port" as the rule type, then click "Next".
    • Select "TCP" as the protocol and enter "5354" in the "Specific local ports" box.
    • Click "Next".
    • Select "Allow the connection".
    • Click "Next".
    • Select the network types (Domain, Private, Public) to which the rule applies.
    • Click "Next".
    • Enter a name and description for the rule (e.g., "Allow TCP 5354").
    • Click "Finish".
  2. Create an inbound rule for UDP 5353:

    • Repeat the above steps, but select "UDP" as the protocol and enter "5353" in the "Specific local ports" box.
  3. Create an inbound rule for TCP 631:

    • Similarly, repeat the steps, selecting "TCP" as the protocol and entering "631" in the "Specific local ports" box.

 
Verify That the Ports Have Been Successfully Opened

  1. Verify using Command Prompt:
    • Open Command Prompt (press Windows key + R, type cmd, then press Enter).
    • Type netstat -an | findstr "port number" (e.g., netstat -an | findstr "5354") to check if the port is listening.
    • If the port is listening, it means it has been successfully opened.

Notes

  • Security: Opening ports may increase security risks. Make sure you understand why you need to open these ports and only open them to trusted networks and devices.
  • Administrator Privileges: Some firewall setting changes may require administrator privileges. If you encounter permission issues, try running Command Prompt or Control Panel as an administrator.
  • Restart Firewall Service: In some cases, you may need to restart the firewall service for the changes to take effect.

By following these steps, you should be able to successfully open TCP ports 5354, UDP port 5353, and TCP port 631 in the Windows firewall.
---
How to stop Windows firewall from blocking Bonjour hostname resolution
https://apple.stackexchange.com/questions/71847/how-to-stop-windows-firewall-from-blocking-bonjour-hostname-resolution
---
What is Bonjour on my Computer? Windows 10 Bonjour Program PC Guide
https://www.freecodecamp.org/news/what-is-bonjour-on-my-computer/

 

Download Bonjour Print Services for Windows

https://support.apple.com/en-us/106380
Bonjour Print Services for Windows lets you discover and configure Bonjour-enabled printers from your Windows computer using the Bonjour Printer Wizard.

Use Windows Update to make sure you have the latest Service Pack installed for your computer.

Printer requirements

Bonjour Print Services works with either:

* network printers over Wi-Fi or Ethernet

* USB printers shared via a Mac or an AirPort base station

Firewall requirements

The Bonjour networking protocol sends and receives network packets on UDP port 5353. The Bonjour installer will configure the Windows firewall appropriately during installation on supported systems, but if you have a separate "personal firewall" enabled, you will need to ensure that UDP port 5353 is open for Bonjour to work correctly.

What's included

This package installs the Bonjour Printer Wizard in "Program FilesBonjour Print Services" and creates a shortcut on the Desktop.

Supported Languages:  Dansk, Deutsch, English, Español, Français, Italiano, Nederlands, Norsk Bokmål, Polski, Português, Português (Brasil), Pусский, Suomi, Svensk, 日本語, 简体中文, 繁體中文, 한국어
Apple, the Apple logos, MacBook, iPad, iPhone, Apple Watch, and Apple Vision Pro are trademarks of Apple Inc., registered in the U.S. and other countries. App Store and Mac App Store is a service mark of Apple Inc., registered in the U.S. and other countries.
© 2014- 2024 Flyingbee Software, All Right Reserved.
United StatesUnited States

We uses cookies to give you the best experience, analyze traffic, and personalize content. By continuing using our Site, you agree to our use of cookies. The information collected might relate to you, your preferences, or your device, and is mostly used to make the site work as you expect it to and to provide a more personalized web experience. However, you can choose not to allow certain types of cookies, which may impact your experience of the site and the services we are able to offer. Read our Privacy Policy or manage your cookie preferences. If you would like to submit an opt-out request with respect to your non-cookie personal information (e.g., your email address), find our support email address to opt-out of sale/sharing/targeting with respect to non-cookie personal information.