Aggressive dogs are a common problem when travelling in places such as Asia, South America and some Eastern European countries like Romania. The dogs are often feral (and hence not used taking commands from people) and may be running round wild in packs, which can be extremely intimidating if you are confronted by one. The obvious precautions — travel in groups, avoid areas where the dogs are, don't go out at night when they are most active, and carry a walking stick if you must go — will reduce the risks but not eliminate them.
Such dogs are rarely rabid, but it is possible. Consider being vaccinated against rabies before travelling to such areas. See individual articles here for region-specific information and consult a physician (preferably one with expertise in travel medicine) for advice on vaccinations before you travel.
What to do when confronted by an aggressive dog
DO NOT RUN! Although it may seem counter-intuitive when you suddenly see an angry, barking and snarling dog running towards you, the most important thing to do is not to turn and run. The dog's natural instincts will kick in and it will chase after you.
Stay calm, don't make any sudden movements, and don't look the dog directly in the eye: dogs see this as a challenge and may react by becoming more aggressive.
Try to turn sideways on: this isn't necessarily a submissive gesture but will minimise the chance that the dog will see you as a threat. Also, if the beast does attack, this protects your throat and other senstive areas.
Throwing stones, dirt or sand at dogs that begin to approach you is often effective. In certain areas such as Iran, the locals' response on seeing dogs nearby is often to pick up a few stones to throw at them. The dogs will fairly often retreat if they just see you bending over for ammo.
If you are confronted by a dog when bicycling a good thing to do is to grab your bicycle water bottle and throw water to the dog. This causes the dog to back off. When dismounting away from the dog, your bicycle can be a useful barrier.
If you are confronted by a dog when motorcycling, approach it slowly to upset its timing, then speed up to leave it behind.
If you're unlucky enough to get attacked, there are a number of things you can do to minimize the damage.
If you have an object (bag, coat, umbrella, etc.), you can hold out in front of you, offer this to the dog as it attacks. Alternatively, wrap some padding around your arm and use this. If the dog bites on this, keep hold of it: if you let go, the dog will realize that it's not part of you and go for something else.
Try using a pepper spray and spray it directly into the face. Repeat spraying until the dog goes away.
If you get bitten, don't yank yourself away from the dog; its teeth are designed to stop things being ripped out of it's mouth, Also, the animal's instincts will be to bite harder.
Seek medical help immediately if you're bitten! Besides infection from a bite, feral dogs can carry rabies, which is 100% fatal if not treated quickly.
This is a usable article. It touches on all the major areas of the topic. An adventurous person could use this article, but please plunge forward and help it grow!