i had that problem a few days ago after accidentally pressing square whilst logged in (which lets you change location). then i got the can't connect thing. got angry, restarted ps3, only to find the already logged in message. rinsed and repeated. got angry, had a sandwich. i decided to do some offline racing just to pass the time. couple of hourse later, i tried to log in expecting a failure, and it worked!
sadly the only fix i know is the waiting game. i have NAT 2 as well btw.
i'm sure someone will have a more adequate solution but i thought i might as well share my experiences