Ferric nitrate is cheap. Here’s a link for 100g for $10.95. That’s enough to last for many guns.
If you dissolve iron in nitric acid, you get ferric nitrate. The main difference between the ferric nitrate crystals you buy and ferric nitrate that you make is that homemade ferric nitrate is in solution in water, and with the crystals, you have to add some water.
If you wnat to be totally PC, you can make your own ferric nitrate (or as we say here, aqua fortis). This is an expensive and somewhat dangerous procedure. Like Dan, I can’t see any reason for the average builder to do this.
Aqua fortis is used as a wood stain. Historically, barrels were browned with dilute nitric acid, and many other chemical compounds as well. Ferric nitrate is an oxidizing agent, so I suppose it could be used to brown barrels. I’ve never tried it, so I don’t know how effective it would be.
You can get nitric acid for browning if you want to. The nitric acid isn’t especially expensive, but since it’s a hazardous material, the shipping is quite expensive. You’re looking at something like $75-$100 to get some nitric acid. Again, unless you know how to handle strong acids, you’re a lot better off using commercial products.