Are soldiers allowed to own personal firearms?

Provided that one obeys all city, state, federal etc laws, do soldiers have the same right under the second amendment to own firearms for personal use outside of their official duties such as hunting, target shooting etc?
8 answers 8