I have at various times expressed my complete contempt for the police and military branches of the United States government (as well as foreign governments, though they don't pose as much of a direct threat to me). The bourgeoisie nerds in the libertarian movement (much less the boot-licking 2nd Amendment queers) are often at pains to avoid discussing this subject, both because they're legitimately afraid of being convicted of a 'crime' of holding an opinion against the thugs in power and because they're just pussies who don't like to get into the nuts and bolts of 'how do you actually get rid of state power when they don't just magically surrender.'
To contrast some of my more typical hyperbole I should state that my general legal opinion is that you can't use lethal violence against anyone except to defend yourself against a plausible threat against your person - this does not mean the violence must be proportional, rather it needs to be the minimum necessary to stop the attack. You do not have to condescend to drawing a kitchen knife when attacked with one. Likewise as kidnapping is indistinguishable from attempted murder anyone who tries to drag you off by force can be treated as a murderer. On the other hand once someone is no longer credibly threatening you you can't just kill them - even if they have committed serious criminal acts. One can take the property of criminals, but the only case when execution is appropriate for a non-threatening criminal is when the criminal has actually murdered someone. In this case it's an option of the victim or his heirs to claim any and all property of the offender, including his head.
Police and military personnel who are just sitting around eating donuts and collecting welfare as not even necessarily doing anything criminal. There's nothing wrong with taking money from a gang of thieves, only in helping them steal it. On the other hand take a situation in which a soldier or police officer is engaging in 'active duty': using and threatening violence against non-violent people in order to ensure compliance with the edicts of a criminal agency such as the Marine Corps or parliament of the United Kingdom. They are in the exact same position as someone who breaks into your house at 3am with a gun (often the police and military do exactly this). A foreign army engaged in invasion operations in the vicinity of your person is a self-admitted threat, they are performing activities indistinguishable from that of any other criminal thug or barbarian raider. Thus they may be all considered to be directly threatening your person, even if they haven't seen you or said a word to you. By their affiliation with the organization in question and their apparent compliance with its hostile, destructive and murderous activities they have by their own hand painted themselves as attempted murderers.
Because of this I regard an attack on the police and military engaged in such activities to be entirely legitimate. A soldier who is simply collecting a residual for his services to Lockheed-Martin on a base in Texas can not usually be regarded in such a way - to kill him would be criminal, and excessive. On the other hand a soldier in Afghanistan is an announced affiliate of an organization whose intention there can only be to seize the life and liberty of the persons who reside there. Any Afghan is therefor entirely justified to kill American (or British, or Russian) soldiers who are engaged in operations in his vicinity. This is simply self-defense.
What about the case of the soldier who has killed in the past? Take the easiest case: where it is admittedly so. As American soldiers have no right to do what they do in Afghanistan their having killed someone in operations there - whoever that person was (and even criminals have the right to protect themselves from attempted murder, except at the hands of a legitimate representative of their victims) - they and their heirs have a right to take the life of such a soldier. However, persons who are not in possession of the right to exact such compensation can not simply kill said soldier as he's sitting in a hammock twenty years later.
But there is another consideration of legal principle in order: the outlaw. If a man has been engaged in murderous activity and has either been convicted or has plausibly admitted to his guilt (for example, by having confirmed kills in Operation Desert Storm, a matter of record that both the soldier and his commanders must agree on in order for it to be established) but refuses to offer compensation to his victims then he is in abeyance of legal status. He has chosen not to acknowledge the principles of civil justice and compensation for his crimes and by the principle of estoppel cannot be regarded to be able to legitimately object to others taking this same action against him. Effectively he is transferred from the status of a person at liberty acting in accordance with the law and becomes merely an animal with no protection. Like any dangerous beast he may be killed by anyone, at any time, and has no recourse.
Therefor it is my position that as many soldiers and police will not acknowledge - much less compensate - their victims (victims who they have publically admitted to committing murder and attempted murder against, i.e. by arresting a heroine merchant and sending him to prison, or shooting an Afghan fighter who was attempting to defend his home agains a no-knock raid) they can legitimately be considered as outlaws, persons with no legal status and no claim to complaint against anyone whoosever that treats them in precisely the same fashion.
Because of this there are a great many active duty and retired military persons who can be killed in the commission of their acts, or at any point afterward, by anyone - even a criminal or murderer.
Just because something is legitimate according to a certain theory of justice, of course, does not mean it is prudent. Shooting police, even in obvious self-defense, can get you kidnapped, robbed and killed by swarms of armed men - not to mention the moron lemmings of the public who prefer an authorized assassin with a uniform to a righteous man taking what he has a perfect right to (i.e., the life of a man who has murdered his brother). Simply threatening the police or military can get you killed. There is precedent for being imprisoned or summarily killed on the grounds of statements of belief or intent (such as this one) being declared 'terrorism'.
As I generally regard personal well-being as superior to any consideration of ideological or legal purity I would generally consider it ill-advised to engage in a one-man war against the agents of the state. But I also do not consider people who do such ill advised things to be in any way committing a criminal offense. When the issue in question is one of great personal grief I in fact find it perfectly understandable - while my normal caution and preference for cat-like cowardice is overwhelmingly in favor of simply avoiding the police and invading armies people who have their lives destroyed and loved ones killed by these tax-funded assassins may quite understandably take a different view.
Another question is whether the police have a right to kill violent criminals. The answer is, obviously, yes: anyone, including a violent criminal, may use violence to stop a person engaged in serious violence. Likewise, police and soldiers who are not engaged in violent acts or confronted with the heirs of former victims likewise are at liberty to defend themselves with violence. Where this creates an interesting issue is when there is a combination: a soldier engaged in hostilities in Afghanistan encounters a murderous thug of an opium magnate. In this case both may be considered to be violent criminals and neither of them has a right to complain. Personally, as I find state agents to be the worse danger on the whole I would root for the jihadi. Better yet if they kill each other.
And while I'm sure the NSA would love to send this post to the DA's office for some trumped up terrorism charges there is nothing here that is not a particular interpretation of libertarian legal theory. Simply replace 'soldier' or 'cop' with 'terrorist' or 'serial killer' - which is in fact what many police and soldiers (of whatever allegiance) are. There is no non-arbitrary difference between the cases, merely one of euphemisms and psychological conditioning.
There are some libertarians who are pacifists (such as Bob Murphy or Robert LeFevre). I simply do not agree with this view. My position is much more derived from common law and primitive Germanic jurisprudence than any of the moralistic libertarian ideologies, and I regard the right of self-defense to be simply a fact of animal existence and civil legalities than any sort of transcendent claim on absolute ethical values. Other libertarians are functional pacifists, in that they regard violence or escalation of violence to be undesirable. They often point to the poor record of revolutionary courts of justice, and think that encouraging peace rather than countering violence to be more pragmatic. This is a somewhat more nuanced position, but I think it is only situational. Most of them would acknowledge that it may be prudent to carry and use a firearm against armed robbers. But the difference between the armed robber and the USMC is mainly one of scale and social support. If the view of soldiers and jihadis sharply deteriorated and a willingness to defend oneself were heightened it might actually be practical to physically defend oneself against aggressive agents of the state. And while revolutions do have poor track records so do enduring states - and if it is a question of one's own life, I would say it is better to risk being tried and convicted than to definitely be killed by some meathead with a Glock and a berzerk button.
What I think is probably more practical than trying to raise an ersatz army to fight the actual army - as such attempts will, at present, result in total annihilation with little accomplished - is simply making it acceptable to think these things.
Thoughts by others in a similar vein:
To Break a Tyrant's Chains by Duncan Long, a discussion on how guerilla warfare might be employed to defeat various imperial state armies.
How Non-Violence Protects the State by Peter Gelderloos, a left-anarchist's view on how the ideology of non-violent resistance undermines both the will and capacity of anarchists to undermine and defeat political power.