Application Firewall is blocking Screen Sharing

I found that I have run into a bug on my M1 Mac.


Steps to reproduce:

  1. Enable Screen Sharing under System Preferences -> Sharing -> Screen Sharing
    1. Allow anyone, open settings up as wide as possible
  2. Enable Firewall under System Preferences -> Security & Privacy -> Firewall
    1. Make firewall as permissive as possible, Uncheck block all incoming connections, allow built-in software.
  3. Try to connect to MacBook Pro from another MacBook Pro, and it will fail. The connection times out.


Turning off the firewall solves this issue, but is insecure.


Notes:

  • I also have Remote Login (SSH) turned on, and followed the exact same steps, and it has no problems. There seems to be something different about port 5900 or with the Screen Sharing app itself.
  • I have taken network traces to confirm that the TCP packets are reaching my MacBook Pro, the SYN TCP packet is sent, but my MacBook Pro never replies.
  • I have taken Console traces, however there does not appear to be any logs that would hint at what the root cause is.
  • I have checked /var/log/appfirewall.log for messages, however this file is empty. I suppose it would only log blocked connections, which is interesting because this would indicate there is another firewall or bug that is blocking this connection, but not logging it anywhere that I could find.


It seems that others are having the same exact issue, please reference these two threads here:

Screen Sharing Blocked by Firewall Despit… - Apple Community


Firewall is blocking Screen Sharing - Apple Community


MacBook Pro 16″, macOS 12.4

Posted on Jul 27, 2022 11:19 AM

Reply

Similar questions

2 replies

Jul 28, 2022 1:45 PM in response to dconnett2

Hi dconnett2,


Thank you for using the Apple Support Communities! We would first recommend the guidance in the following resource that can help if you're experiencing an issue when sharing your screen with another Mac:


If you can’t share Mac computer screens


After trying those steps, if the issue remains we recommend that you reach out to Apple Support directly to take a further look. Please reach out here:


Get Support


Hope this helps!

Have a great day.


Aug 1, 2022 5:19 PM in response to Lissy_12

Lissy_12,

I have followed all these steps, and the issue persists. The additional steps that I have performed indicate that it is very likely a bug in the MacOS system. Especially since I was able to SSH into the same machine, but not Screen Share. Turning off the firewall fixes the issue, so it must be firewall-related.


Thank you for your reply, I wonder if we can open a ticket with an Apple engineering team.


Regards,

Dave

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Application Firewall is blocking Screen Sharing

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.