There are megarules for having personally owned guns on base. You usually have to keep it with some master at arms and check it out when you would like to go hunting or target shooting.
It really cant be done.
So you move off base and enjoy the rights of a civilian in that regard.
I used to keep my Galil and ammo in my truck when I was at Ft. Bragg. Actually pretty lucky it wasn’t stolen.
As an Army brat in the 60s and 70s, there was always a small rifle rack with 5-6 hunting and target rifles and shotguns in the back of a closet in our quarters. I vaguely remember Dad having to register them, probably with the MPs, but they were definitely in our quarters.