Hydraulic cylinder with square front flange