There are specific products for this job. One of the most famous is called Frame Saver I believe. Then you have alternative sprays that will leave a wax coating inside the tubes. You just spray once and its good for a long time.
Check out some YouTube videos that explain how to protect bike...