K.W.
This is a treatment, not a preventative, but it should help. At the very least, it's cheap and harmless.
Boil a few bags of black tea in a cup or two of water. After 5 minutes or so, remove the teabags (or strain out the tea, if you're using loose tea). Continue to simmer the water down until it's almost gone, but *don't* scorch it or you have to start all over again. Pour the tablspoon or so of remaining liquid into the top of a small jar. Leave it out to dry. You'll end up with a very dark brown shiny layer, possibly one that flakes a bit. This is your medicine.
To store, put the lid on the jar and label it well. As long as you make sure the medicine is always dry before you put it on the jar, it should last indefinitely.
To use, wet a Q-tip and rub it on the medicine until it turns brown. Dab this medicine onto the cold sore or canker sore. Experiment to see how often you should treat for best results. It works best if you catch the sore when it's just emerging, but it works nicely on "mature" sores as well.
I've heard lemon balm works well for this too, but I've only ever used black tea.
Good luck!