Boeshield. You can find it in marine shops, and online.
Objective testing by one of the woodworking magazines on cast iron machines showed this to be the most effective in preventing rust. It's a mix of waxes in a petro-solvent. YOu can spray it on and leave it; it forms a thin waxy coating when the solvent evaporates. Or you can spray and wipe off excess which makes a very thin coating if the machine will be used within a few days.
Originally invented at Boeing apparently to coat the internal structures of aircraft wings, as I recall.
For parts which are rusted and which need cleanup, try Evaporust - some auto parts stores carry this. Very effective, although u have to submerge-soak the rusty part - can't spray it on.
Bert