A prison or jail/gaol.
Synonym of military prison.
A station for guards, especially at the entrance of a town, castle, etc.