Well I agree with the obvious ...close the door. If it happens while you are home you might try tethering his leash to a belt you wear. You can crate if you are not home. Remember you are the Alpha of your "pack". If you don't lead the dog will assume the role.