A BallSocketConstraint forces its two attachments into the same position and allows them to freely rotate about all three axes. However, you can enable limits to restrict both tilt and twist.
Limits
You can set limits to restrict both tilt and twist of a ball socket, similar to how a human's head can tilt and turn within a limited axial range. Enabling the LimitsEnabled property exposes the UpperAngle value to restrict tilt within a cone; it also exposes the TwistLimitsEnabled property which, when enabled, lets you restrict twist rotation through the TwistLowerAngle and TwistUpperAngle limits.
Enabling LimitsEnabled also exposes the Restitution value which defines the elasticity of the attachments at their tilt and/or twist limits.