I've Encountered allot of people who are having connection issues recently. Which is not helped with the fact Demon's Souls does not notify you when you have been disconnected from server. If you cant see anyone online press select if you can't write a comment you have been disconnected. There are no specific ports for Demon's Souls but there are the PS3 ones which can be opened. Port forwarding can help if you have trouble with connections and online play with any game.
IMPORTANT: Take extreme care port forwarding and only attempt to port forward if your confidant with it.
Playstation 3 Network and Server Ports:
If you don't know how to do this you can follow this useful website: http://portforward.com/
Hope this information was helpful, may have been posted before by others but I thought I would share.