How to Turn on UPNP in an iMac
Universal Plug and Play is an option present in software and hardware firewalls. It automatically opens ports for programs that request it. When the programs aren't using those ports, they are automatically closed. Although UPnP can present security loopholes, it's still better than having all ports open all the time. OS X has a built-in firewall, but because of the potential security problems with UPnP, Apple has restricted its use to signed software. This way, only legitimate software can automatically have ports opened for it.
Open "System Preferences" from the Apple menu.
Open the "Security" icon.
Select the "Firewall" tab and click "Start."
Click the "Advanced" button. Now select "Automatically allow signed software to receive incoming connections."
Close the window when you've finished making your changes.