Inverse Kinematics leg/arm rig bending the wrong way
I am 4 years too late, but still.
You need to create another bone outside the leg and it should not be parented to any other. Now open the bone constraints(where you created the inverse kinematics) and you will see "Pole Target", select your Armature and below will appear "Bone" and select the bone you created.
After that the bones will only bend in the direction of this pole target bone, so you should put it in front of the model.