If your dog rushes out the door whenever you open it, he could get lost or hit by a car. Once outside, people often run after him or make a fuss, which actually rewards and reinforces the behavior of rushing out the door. Thus prevention is the best strategy. Whenever you need to open your door for a visitor, to get the mail or even just to look outside, start with calling your dog to you and commanding him to sit. Reward your dog for sitting and waiting. If you go to the door and your dog starts to rush toward it, walk away and go about your business inside the house. You may need to practice with a leash on at first but eventually your dog should get the message that he needs to sit calmly when the door opens and closes.