Sounds like your dog is just guarding his/her territory. My dog Luc is also the friendliest dog on the planet to anyone he meets EXCEPT when they're in HIS house. Then he barks like crazy trying to protect his home and his people.
Check out this page about aggressive dog behavior to see if you can get some ideas: Click here
Meet our pint-sized Coton de Tulear puppy, SGT STUBBY, reporting for duty in the cuteness brigade! This little lovebug is not just a people magnet; he's
Yuki came to our home as a tiny puppy in November 2021 (he was the smallest of his litter). We hoped he'd be a companion for our aging Golden retriever