Section 65. Every commanding officer, when on duty, may fix necessary bounds and limits to any parade or encampment, but not including a public road within such bounds in such manner as to prevent traveling thereon, within which bounds and limits no person shall enter without authorization. Whoever intrudes within the limits of the parade or encampment, after being forbidden, may be ejected, forcibly if necessary, or may be confined under guard during the time of parade or encampment, or during a shorter time, at the discretion of the commanding officer; and whoever resists a sentry may be detained by order of the commanding officer and dealt with as provided in section sixty-six.