if you read the federalist papers, they make it quite clear that the 2nd amendment is for exactly what you said, to defend yourself against foreign and domestic enemies...not just for militias...