There are a couple products that already exist for doing what you describe.
Although i think you could also probably use a tube like you said, however if dirt did get in, the tube might keep it pressed against the stanchion which could result in scratches. The tube may also balloon when the fork was compressed due to the non-breathable nature of a tube.
The first that comes to mind of existing products is the Lizard Skins Fork Boot, they also make them for rear suspension as well which i have used. I have not used the Fork Boots but i have been happy with every other Lizard Skin product i have used. They are a breathable neoprene material but protect the stanchions. Image below
In addition, in my opinion the best defense is keeping it clean and well maintained. Wiping off the stanchions when they become dusty in addition to using a proper lubricant designed for stanchions to reduce friction can go a long way for fork life. One example is Wet Seal by Miles Wide, there are a lot like it though. Wet Seal was developed in part by Suspension Experts who in my opinion do awesome fork work so it is what i would recommend but there are others available as well.
This stuff also works pretty well for stanchions, just don't get it on your brakes!