I think the easiest way would be to create a "reverse" sphere object. One that is hollow inside, and has colliders on the edges. If you can do that, it would surely be the fastest way.
If you want to do it programatically, it will be harder to answer since you gave no language / engine info. However, I will try:
You need to somehow check whether the inside ball touched the outside sphere. Since they are both spheres, you can do that with simple maths: if((center of the ball - center of the sphere) + radius of the ball > radius of the sphere) then
if((center_of_the_ball - center_of_the_sphere) + radius_of_the_ball > radius_of_the_sphere)
then we have a collision.
In that case you should change the direction of the ball. You could achieve that by rotating the current movement vector of the ball around the normal at the collision point. If I'm correct, you could use the vector between the center of ball and center of sphere as that.