The only thing you can do is be persistent and consistent. Discipline him EVERY time he barks. A good way to do this might be to put him in his kennel whenever he starts barking and ignore him until he settles down. But you have to be consistent.
Fou month old dogs are little kids and little kids don't have the formed sense of society adults do. If you have a kennel to train him with and lots of distractions over time his habits can be taught.