a) could technically be misinterpreted as the dog having beef with the entrance, similar to "There's a dog barking at the mailman." (Then again, some dogs will bark at just about anything...)
b) doesn't have this ambiguity. It simply says there's a dog located at the entrance, barking at *something*.
The rule for participial adjectives is this: if it’s a single word, it goes before (like a standard adjective does). If it is part of a phrase, it goes after. I think barking dog is preferable here, since the entrance and barking have no connection.
If you check the book Practical English Usage, by Oxford, see the entry on participles, Participles (3) 1 used as adjectives and participles (4) clauses, it outlines the rules fairly clearly :emoji_wink: