The golden rule is never ever let him out. No matter how much he meows and yowls, don't give in. If you do, he will learn that all he has to do to force his will on you is to make enough noise. Instead, try to get him away from the door by distracting him with a food treat followed by a play session. For some time he will probably keep trying to make a mad dash out the door whenever you open it to enter or leave. Be prepared by keeping treats by the door. If he's persistent, drop your keys when you are entering to make a noise. If he does get past you, never mind; keep trying. Never punish him when he comes back, though, as he will then have a bad association with returning home. Because he probably will occasionally defeat your best efforts and get out, make sure he is properly identified at all times.
Make your house appealing and provide your confined cat with fun, outdoor-like activities. Interactive play can simulate hunting; scratching posts will let him mark his domain; a cat tree can be scaled just like the real thing, and from a perch in front of a window, the outer limits of the territory can be monitored. Be patient; a die-hard outdoor cat make take four or five months to get used to the idea that life can be just fine indoors. If all else fails, see your vet for medication to calm him.