No, you can't hermetically seal a border. But you can come close. And that is all that is needed: lower the chance of success to below a reasonable threshold. Right now, terrorists and tons of explosives could walk across the borders at will, no matter how many we shoot in their caves.
Sleeper cells have been here for over ten years. It's like trying to close the barn door after the horse has left.