I don't think such a rifle exists.
I assume a lot has to do with the disposition of the bear. If he's angry and/or scared you'd want at least 50ft. 100ft would be better.
Doug White used a 44 Mag at extremely close range when a Grizzly attacked him after he shot & gutted a Moose.
Check out the story & pics.
https://thegreatwhitehunter.wordpress.com/the-longest-minute-terrifying-bear-attack/