You’re assuming that the people running these compounds WANT to keep the terrorist killers out, or could keep them out even if they wanted to. Remember that the UN hates guns.
also remember that Hamas have used UN vehicles and ambulances to transport men and ammo.
There is a picture somewhere on the internet of a UN post and flag, trouble is that right next to that UN flag is a Hizbullah flag