According to the BATF, we active duty military folks can legally purchase firearms in the state of our Home of Record (generally where you pay taxes too/have your drivers licence/are registered to vote, and in the state of your assigned duty station. I don't know how California laws handle this, I had a quick look at the website, but didn't search "military". If the state gives you a hard time, report them to the BATF, the base legal office, and pull out the Soldiers, Sailors and Airmans Civil Relief Act. You may be required to give a copy of your orders, possibly a letter from your unit commander or the base legal office saying you are not mental, and proof of residency (lease/mortgage paperwork/utility bills). I don't have the BATF page link here on duty, I'll post it when I get home tonight.