Keep your dog inside for the most part. If you do take them outside make sure your fence and gates are secure, or keep them attached to you with a secure leash and collar.
When in the house and anxiety starts due to fireworks, put on the radio or tv to help cover the sounds up a bit for them.
If you go out, leave them home. If they are crate trained then put them in their crate in a secure area. If they are not crate trained make sure they are in a secure room where they can't escape or do harm to themselves if they start to panic.
If you plan on going out for long periods of time then consider having someone that is experienced dog sit for you or take them to someone that is responsible and knows how to handle anxiety such as a trainer or a vet.
You may also consider getting a Thunder Shirt for your dog to see if it helps with the anxiety. Some dogs may also require some medication from your vet if the anxiety is severe.