The second amendment
... is to protect us from the government
Actually, if you read the amendment, there is a whole clause about a militia being needed to defend a free state. As such, it was seen that it was a good idea to have the populace have access to arms in order to form a militia in response to an invading force. In other words, part of the responsibility of owning a firearm is to be ready to defend the government from outsiders. Yes, there is also some thought about the right "to protect us from the government," but I honestly wonder how realistic such an idea really is.
Take for example, the civil rights movement in the U.S. If ever there was a case for armed insurrection, this was it. An entire race of legal citizens were systematically excluded and segregated, often with the force of law and government on the side of segregation. In parts of New Orleans, black people were required *by law* to get off of a sidewalk whenever a white person was on the same side.
To counter this repression, compare the effectiveness of some of the more extreme Blank Panther groups vs. the effectiveness of the peaceful marches.
If you can come up with an example where the armed citizenry managed to achieve such things without an aiding government, please let me know. And, no, the American revolution doesn't count - it most likely would not have succeeded without the aid of the French government.