For example, I just found this on the net. It's a link to the regulations about firearms on military property for Fort Hood in Texas:
Fort Hood regulation 190-11
http://www.hood.army.mil/dhr/pubs/fhr190-11.pdf
A military installation can create rules for the installation that are not otherwise noted in federal law, the same way a county or municipality can adopt county ordinances or municipal ordinances that are not otherwise part of state law.