Here we go (file attached, text also in file)
Grab Bone.002 now and check it out.
Howto:
Enter editmode.
Delete Bone.003
Select Bone.002
ALT+P > Clear Parent
ALT+P > Disconnect Bone
Enter posemode
select Bone.002 whereever it is now first then shiftselect Bone.001
CTRL+I > add IK to active bone
orient Bone.002 as you like it in our case localY axis up.
(select bone and press ALT+R and clear its rotation should do that)
Select Bone.002 shift+alt+C and add a Limit Location constraint.
change the CSpace to be evaluated in local space.
so in local space the Bone.002 is at X:0, Y:0, Z:0 simply XYZ
are local zero at the position we added the constraint at.
Now limit local minX/maxX to 0 and local minZ/maxZ to zero and
leave local minY/maxY be, because thats the axis you want the bone
move along. You will still be able to rotate the Bone.002.
Thats it.
hth