You should inform the gatehouse at the barracks of you’re intentions and make sure you don’t get seen through a scope
It’s 2024 there’s a lot going on in the world right now I wouldn’t push my luck.
Unless the area is subject to a NOTAM or red FRZ, you should be able to fly over it subject to normal CAA rules, but TOAL will have to be from outside the fence unless you’ve had permission, and I doubt if you’ll get that from the squaddie on the gate. That said, my policy is that the military’s business is none of my business, and it is best to leave them well alone!
Keep an eye out for helicopters TOAL even at minor bases.