If its just a 4th of july thing, drugs are a quick way to solve the problem but is of course temporary. Be careful with dose as size (of your dog) matters! If you want a longer term solution, you will need to start a program of positive reinforcement around noise stimulation or better yet, see a pro trainer.
If your dogs temperament is off, you may not be able to train out of the responses you are seeing. 4th is a disaster here in Phx as most of the pounds are overwhelmed with dogs who bail from overstimulation (fireworks).
fwiw-, I had a dobie that could care less about fireworks going off, but God forbid you let off a round near him (unless you were me or my wife). You could have called him "arm be gone".
I miss that dog