Setting rotational limits for bones in a control rig

I have a control rig for a mechanical leg using a fabrik solver that works great, but right now the bones are able to rotate infinitely and in any direction. I want to constrain each individual bone to only rotate on a certain axis, and limit how much they can rotate in both directions along that axis. In every other 3D program I’ve worked with this is very simple, but for some reason I can’t find any information about how I could do this in UE5.