Don't do anything to the dog, it’s not the dog’s fault he’s been trained to bark by inconsiderate jackasses. Beat the crap out of the neighbor, it works great. You only have to do it once and word gets out and the entire neighborhood is miraculously rid of barking dogs. I’ve also found that when the neighbor’s dog craps on my lawn, and that pile ends up on the neighbor’s porch and they know exactly how it got there, the dog stops crapping on my lawn.