Edit: This solution, which is a simplification of Eng Morph's tutorial, seems to work better: Create a 4 bone armature: Bone 2 is parented to bone 1. Bone 3 is parented to bone 4. Give bone 3 an IK constraint with bone 2 as Target. Select bone 4 in Pose mode and in the Bone panel > Inverse Kinematics, set IK Stretch to 1 and activate Lock IK on X and Y:

Only top voted, non community-wiki answers of a minimum length are eligible