Thanks for writing in,
What you are describing is called a reverse sneeze and is a normal behavior to clear the throat. This is often seen in smush faced breeds if their soft palate gets in the way of their trachea. This can also be seen in dogs that have allergies, or occasionally a dog will do with no good reason for it. Unless it is for extended periods of time or is inhibiting normal exercise etc, then it is not a problem. I hope this helps!
There isn't really anything you can do as far as rubbing because this is an irritation in the nasopharynx. What you can do if you think its going to happen again is give some benedryl at 1mg/pound to help if it is an allergen causing it.
Your dog is not uncomfortable when this happens. IT is a normal reflex nasal irritation-sneeze, throat irritation-cough, nasopharynx irritation-reverse sneeze. It just sounds very dramatic, but its a normal behavior. SO give the benedryl a try and see how he does.