You can get aerosols of "framesaver" for this. Blow it into the small holes you find on most frames near the lugs on the chainstays and forks and down the seat tube, inside BB shell and steerer tube. Any kind of oil or waxoyl would do anyway if you can ensure it gets to where it needs to be.
3 in 1 oil, may be better at this than chain lubrication. 3 in 1 was developed to keep spindles in cotton factories from going rusty during shutdown times. I had heard this recommended many years ago. Better alternatives may now exist.
I've never bothered doing anything to the inside of my Vivente tourer, to prevent rust buildup, and it's still going strong after > 6 years and > 80,000km. I have checked the inside of the bottom bracket shell on those rare occasions I have to replace or just clean the bottom bracket, and I can't see a lot of rust.