There is- a 10 mile wild dead zone, toatlly stripped of vegitation and blasted level before being paved over, with constant armed patrols, both aircraft and foot, a sensor network that would be insane, and automated weapons systems, up to an including anti-aircraft and anti-tank systems. The last line would infantry men standing ten feet apart, told to shoot anything that enters thier 60 degree field of fire at ranges of less then 200m without them being told it would be comming.
It would work. It just needs an army of clone troopers, a computer system with AI a lot more advanced than we have today, and more money than I even want to estimate. We don't have any of the three, and the first two are really, really bad ideas. Just ask any scifi buff.