Giving up freedom for security results in having neither.
Spend much more money on intelligence and defense if necessary but don't encroach on Constitutional rights.
That said; illegal aliens and enemy agents are not protected by the Constitution at all. "Regular" immigrants and visitors are not protected by the Constitution until they step onto American "soil". We definitely need to be pre-emptive and pro-active in this area.
I believe that we need to realistically define the enemy and formally Declare War.
For domestic terrorists, the regular justice system should do the job, (although I'd like to replace all of the "activist" judges that adjudicate according to their personal opinions rather than the laws of the land, get rid of the "ambulance chasing" opportunistic lawyers and moronic "no clue" juries that seem to predominate in these cases."
Guys like this Padilla scrote, an American citizen who converted to militant islam in prison and later was trained and financed by the Al-queda is a more difficult case.
Personally, I believe that once you go to a foreign country for training in terroristic activities you lose your Constitutional rights. It is no different than joining the military of an enemy nation in time of war. However, I don't know how the Supreme Court would rule on this.