12 Replies Latest reply: Oct 31, 2013 4:41 PM by QSA ToolWorks
daveinabin Level 1 Level 1 (0 points)

I have two Macs (MBP and an iMac) running Lion. I want to connect to the iMac using ScreenSharing. Screensharing was enabled in SL and was working fine. After the upgrade I'm unable to connect to the iMac using ScreenSharing unless I disable the firewall.

 

I notice on the MBP when I activate ScreenSharing that it adds screensharingd and kdc to the firewall rules. It never does this on the iMac. I suspect this is the issue. I'm unable to add screensharingd to the firewall rules manually because it is part of a package.

 

Is there a workaround for this? If not, could I copy the com.apple.plist (firewall settings) from the MBP to the iMac or is this file dependant on the hardware?


MacBook Pro 15, Mac OS X (10.7)
  • 1. Re: Firewall & Screensharing
    MalcontentsUnite Level 1 Level 1 (25 points)

    I actually had the opposite problem with a mid-2011 MBP and an early 2009 Mac Mini. The Mini allowed screen sharing while the firewall was turned on (without having entries for screensharingd and kdc in the allowed list) but the MBP did NOT allow screen sharing while the firewall was turned on (with having entries for screensharingd and kdc in the allowed list). The solution for the problem in my case with the MBP turned out to be removing the entries for screensharingd and kdc from the allowed list, and screen sharing magically started working again.

     

    But if you want to try adding them to the firewall, the trick is to navigate to the screensharingd and kdc executables in the Finder. Then in the Firewall Allowed list, click the Plus button to add a new entry, and either drag the screensharingd executable file from the Finder window into the file browser window for the firewall, or drag the folder proxy icon from the Finder window into the file browser window for the firewall and select the screensharingd executable. That should let you add an executable from within a package to the firewall allowed list. Then repeat for the kdc executable.

  • 2. Re: Firewall & Screensharing
    daveinabin Level 1 Level 1 (0 points)

    Your tip helped me get KDC and screensharingd into my firewall list. However, I still have to disable the firewall to get connected via screensharing.

     

    I've looked for a way to completely reset the firewall but I haven't found anything.

  • 3. Re: Firewall & Screensharing
    kevinopp Level 1 Level 1 (25 points)

    i'm not using my firewalls at all, and i have not been able to get screen sharing to work at all, which has never been a problem for me. i'm registered as an authorized user on both computers, the passwords are correct, but it keeps telling me that the username/passwords don't work. and this is after the computers have already been "connected" using the exact same passwords and user name.

  • 4. Re: Firewall & Screensharing
    John Baughman Level 1 Level 1 (35 points)

    kevinopp,

    Seems like you have the same or similar problem to the one I've described in another post:

     

    https://discussions.apple.com/message/15735328#15735328

     

    Try connecting for screen sharing using the "Go/Connect to server" method in the finder menu.  Use the format:

    "vnc://(insert local ip here)"

    This will request your login information but for some reason it will accept it and allow screensharing. At least it does in my case.

    John

  • 5. Re: Firewall & Screensharing
    steve.o Level 1 Level 1 (0 points)

    I had similar difficulty.  Neither my Mini nor my MBP would share screens after the upgrade.  I ensured Screen Sharing was enabled (in Sharing) and KDC, Screen Sharing and screensharingd all Allow Incoming Connections (in Security & Privacy -> Firewall).

     

    That initially had no effect.  Then I did two more things.  I trashed the existing *.vncloc file on my MBP (~/Library/Application Support/Screen Sharing/*.vncloc) but not the *.vncloc on my Mini.  Then I rebooted both systems.

     

    On restart Screen Sharing worked fine on both systems.  In my case it seems that it was a matter of updating the System Settings and rebooting.  Even though I deleted the *.vncloc on the MBP I don't think that made any difference.  That is because I didn't delete the original *.vncloc file on my Mini and everything still worked fine after updating System Settings and reboot.

     

    Your mileage may vary.  Good luck.

  • 6. Re: Firewall & Screensharing
    SmooZ Level 1 Level 1 (0 points)

    Opening port 5900 in my firewall settings worked for me.

     

    http://support.apple.com/kb/TS1629

     

    5900TCPVirtual Network Computing (VNC)
    (Unregistered Use)
    -vnc-serverApple Remote Desktop 2.0 or later (Observe/Control feature)
    Screen Sharing (Mac OS X 10.5 or later)
  • 7. Re: Firewall & Screensharing
    steftheref Level 1 Level 1 (0 points)

    My problem was that I could Screenshare from my iMac to my MacBook but not the other way round. I had been able to Screenshare in both directions  before I upgraded both machines to 10.7.3

     

    At the AppleStore I was able to Screenshare from the MacBook to another Mac so that ruled out a problem with the MacBook. The Genius advised me to turn the Firewall off on the iMac so I went home to do this. It didn't help. But...

     

    I found the following did solve the problem.

     

    On the iMac>System Preferences>Security & Privacy>Firewall

     

    Leave Firewall On. I did not need to turn this off.

     

    Unlock the pane if required then click Advanced

     

    Then scroll down to

     

    screensharingd (in my case this had a red dot and Block incoming connections)

     

    Change Block to Allow. The red dot turns green

     

    Click OK

     

    Relock the pane

     

    Now Screensharing works in both directions

  • 8. Re: Firewall & Screensharing
    WoodNWool Level 1 Level 1 (0 points)

    daveinabin has likely solved his problem by now, but since I just wasted a good many hours trying to solve the identical problem without any of the suggested solutions from my google searches helping, I thought I'd post my solution here, in case someone else runs into this problem.

     

    Summary of the problem: 

    After upgrading the host machine to Lion, I could no longer screen share (didn't even get the login window) into it from other machines (running Lion or Snow Leopard) unless I turned its firewall off.  Changing the 'allow incoming traffic' settings for screensharingd didn't change anything.  The console showed that any screensharing attempts were being denied, even though the preferences pane was set to have it permitted.

     

    Solution that worked for me:

    1) Turned off all sharing in System Preferences.

    2) Deleted everything (using the minus sign icon) in the Security -> Firewall -> Advanced panel (This may or may not be necessary; I tried this along the way and by itself it didn't help.)

    2) Turned off firewall in System Preferences.

    3) Trashed the following two files:

              /Library/Preferences/com.apple.alf.plist

              /Library/Preferences/com.apple.alf.plist.lockfile

    4) Rebooted the (host) computer.

    5) Turned screen sharing back on in System Preferences.

    6) Turned firewall on in System Preferences.

     

    Now screen sharing works again as before.

  • 9. Re: Firewall & Screensharing
    MacSee70 Level 1 Level 1 (0 points)

    I experienced the same problem. Based on WoodNWool instructions I was able to get screen sharing working again (access from my iMac to my MBP). The only step I left out was step 2) (the first one ;-) - deleting the entries in the firewall settings using the minus sign.

  • 10. Re: Firewall & Screensharing
    oreio Level 1 Level 1 (0 points)

    Same problem here: no VNC connection after Lion upgrade. I'm happy to confirm that WoodNWool instructions solved my problem. I've skipped step 2, it was not necessary here.

     

    Note: I've tried to skip the reboot step also, but that's required.

  • 11. Re: Firewall & Screensharing
    __dmitri__ Level 1 Level 1 (0 points)

    Same here. Removing /Library/Preferences/com.apple.alf.plist helped resolve the problem with ssh availablity on the network... BUT the problem re-appeared twice since that. Seems something in the OS corrupts this file.

  • 12. Re: Firewall & Screensharing
    QSA ToolWorks Level 1 Level 1 (0 points)

    I'm also happy to confirm that WoodNWool instructions solved the problem for me. (OS X Server 10.8.5)