Too much humidity and no protection on the guns themselves will cause rust. How you achieve that depends on the specific circumstances. I prefer to keep guns and ammo in separate cabinets (weak cabinet for ammo). Silica gel has a limited lifetime in adverse circumstances and may not be the best approach.
As you probably know, ammo stored in ammo cans lasts for decades in military storage huts.