Just slip a piece of pipe over the rod. Limit the travel to whatever you want. Most usual sailboat application for this is on the cylinder for a hydraulic backstay.