The libertarian view is that national defense is in principle absolutely a legitimate function of government, but it certainly needs strong limits. Preemptive actions, humanitarian actions, while not necessarily to be ruled out completely a priori should face incredibly strict scrutiny. A lot of current effort undertaken by the U.S., other militaries is unnecessary, not just the sorts of things I mentioned but more mundane things of having our troops stationed all over Europe as part of NATO. Libertarians would say let Europe defend itself. Cut expenditure, take all those troops home, and gradually reduce the size of the military. We’re not getting any obvious benefit from that. Let the Europeans do it on their own. It is not obvious that the U.S. can make itself a lot safer. There are probably going to be terrorist acts no matter what we do. There are limits to what you can accomplish because these are rare. These are unusual events. But some things maybe would plausibly go in the right direction. Most importantly, not interfering so much in the Middle East unquestionably has contributed to some of the attitudes that tend to support terrorism against the U.S., plus doing other good things that support peace, prosperity around the world – such as legalizing drugs, increasing immigration, supporting free trade, and the like.
More at Source: National Defense | Libertarianism.org