Forgive my ignorance, but I have zero experience with owning firearms. I am a resident of MA but currently live in NC. I am active duty Marine Corps, with no criminal record. I'm 22 years old, and live off of base with my wife. I feel that I should have some kind of firearm in my house. Most of the laws I can find are just OC and CCW, I just simply want to own a long gun. Can I just go out and buy one? Or do I need to jump through some hoops because I'm a MA resident living in NC? I'm going to ask this week about the military side of it, but what are the rules for the real world?

Any help would be appreciated. Thank You.