You're forgetting that the most powerful military in the world was defeated in Vietnam. That being said, I'm not against common sense gun regulations as a practical matter, but to take it too far would put criminals in government or otherwise in charge.
The best answer to this issue is decentralization. Terrorism is a byproduct of government.
I'd argue terrorism can be largely a byproduct of oppression and repression, which are not always carried out by governments.
Government is just a form of reification that takes something that is imaginary and makes it appear real. What you really have are a bunch of terrorists who are legitimized and then those who aren't legitimized. ISIS for example is a government considered illegitimate by the USA and ISIS would say the same of the US Government. What justifies the USA dropping bombs on ISIL? What justifies ISIL attacking USA? Nothing.
In your example, both sides seek to oppress and engage in repression. It's just that ISIS represses women in burka's, etc while the USA oppresses those who don't agree with the banking system (#Occupy).