How to lock component camera rotation and Y and Z location?

How i can lock rotation of component camera parented to mesh of my charater? Also i want it to move just along X axis.