As a civilian, I lived on an Army post in post housing until recently.
I was required to register my firearms at the post Pass & ID office. This goes into a Department of Defense (DoD) computer.
Swords, bayonets and knifes with a blade length longer than X-inches (I can't recall the length) were also required to be registered.
These I stored in my post housing. Soldiers stored their firearms and ammunition in their dorm rooms. There was no central depository to store privately owned firearms.
After acquiring a new firearm, I had one week to register it or I was in violation.
The MPs at the gates asked everyone if they were bringing alcohol or weapons on post. If they lived on post, and the firearm was registered, it was not a problem.
Incidentally, when you register you get a printout of all the guns you've registered, so you can prove to the MP it's been listed.
Visitors take note!
If you lived off post, and tried to come on with a firearm, you were turned away -- even with someone on post sponsoring you.
Now, this may have been a regulation of this specific Army post, or it may be DoD-wide, I don't know.
If my firearm was registered, or not yet 7 days old, I never had a problem with the MPs. In fact, many were interested to see it and, if no cars were waiting behind me, we chatted guns for a bit.
Contrary to the public's perception, most MPs are not jack-booted thugs. In fact, I'd venture to say that there are fewer of those types than in civilian departments. The military doesn't tolerate troublemakers for long, especially if they abuse a civilian who may file a lawsuit.
When I moved offpost, I had Pass & ID erase my firearms from the DoD computer. I was assured this was done; I have no way of knowing.
I never once felt like a 2nd class citizen because I owned guns, when I lived on that Army post. Most folks just shrugged; some were interested and chatted me up.
I've felt more scrutinized living in cities than on that Army post.
I can't speak for other posts, as I've never lived on one, but my experience there as a gun owner was very good.