When hearing a dog bark, one should seek the protection of Allah Ta‘ala from the evil of shaytaan.
عن جابر بن عبد الله، قال: قال رسول الله صلى الله عليه وسلم: إذا سمعتم نباح الكلاب، ونهيق الحمر بالليل، فتعوذوا بالله فإنهن يرين ما لا ترون (سنن أبي داود، الرقم: 5103)
Hazrat Jaabir (radhiyallahu ‘anhu) reports that Rasulullah (sallallahu ‘alaihi wasallam) said, “When you hear the barking of dogs and the braying of donkeys at night, then seek the protection of Allah Ta‘ala (from the evil of shayaateen and from all evil), for they can see what you cannot see (i.e. the jinn and shayaateen, and it is possible that they are barking due to seeing the jinn and shayaateen).”