a .223 might scare bears off with the noise ! that bear would be on you before you dumped a 30rd mag into em. i lean towards a 12ga with slugs.
raccoons :?: put your food up. it's been a long time sine we camped. in those years, outside of ant's and chipmunks . we were never bothered by the wildlife. secure your food and they will not be too interested.
now on the trail thats a different story. there i'd lean towards a 3-4" 44 mag. 45 auto or 10mm
i'd be more concerned with the 2 legged wildlife.