From the XMB of your PS3, go to Settings>Network Settings>Settings and Connection Status List. Scroll down and check your "UPnP" settings, and your "NAT type". Check to make sure you have UPnP enabled from your PS3. From the XMB, go to Settings>Network Settings>Internet Connection Settings. If you configured your PS3 network using the "Easy" setting, UPnP should be enabled automatically. If you used a "Custom" setup, make sure that your UPnP setting is "Available."
Every router has a different way to open your NAT, but all of them require ports to be opened or UPnP. First off, you need to access your router. Go into your routers settings and search around in Firewall or NAT settings until you find UPnP. Make sure it's enabled as shown below.