To prevent cast iron from rusting outside, apply a protective coating such as an exterior-grade paint, enamel, or a specialized outdoor metal sealer. Regularly clean the surface, keep it dry, and avoid leaving water or moisture on the cast iron. Applying a layer of oil can also provide additional protection.