This means most of the terrorism must be imported. To stop that, you close the border. Truly close it, with bullets.
Iraq has a land border of 3,650 km (Iran 1,458 km, Jordan 181 km, Kuwait 240 km, Saudi Arabia 814 km, Syria 605 km, Turkey 352 km). In addition it has a 58 km coast-line. How exactly would you completely close such an enourmous border? Also, in order to close the border with bullets implies that you would shoot anyone trying to cross without authorisation. Shooting foreign nationals, possibly even on foreign soil of countries the Coalition is not at war with would be a pretty dangerous move.
If the US were able to completely close off a border that size, then they would surely do it at home to stop the illegal immigration, since their land border with Mexico is only 3,140 km long.

kill all the terrorists--or deport them
Deport them to where? Every other country in the world will either definately not want them or will probably endorse their terrorism anyway.