The gun truck (a military truck equipped with armor and several machine-guns) seen in Iraq is not a new development. The first ones were built in late 1967, in South Vietnam, by members of the U.S. Army 8th Transportation Group. They armored and armed some 2 ton trucks to provide escorts for convoys getting ambushed by Vietcong gunmen.
As with Iraq, fuel, ammo, and much more, had to be constantly moved, by truck, from South Vietnamese ports to American and South Vietnamese bases inland. The Vietcong guerillas did not have access to the explosives and other materials needed to make a lot of roadside bombs, so their typical tactic was an ambush using rifles, machine-guns and RPGs.
The 2 ton gun trucks proved underpowered. So some five ton trucks were armored and armed (usually with four machine-guns, ranging in caliber from 7.62mm to 12.7mm). Some trucks were equipped with several radios, allowing the truck crew to call in supporting firepower from artillery units, or bombers and helicopters overhead. Accurate records were not kept, but it is estimated that over 400 gun trucks were built, and served as convoy escorts from 1967, until 1973 (when American ground troops withdrew from South Vietnam.)
Because there were so many thousand tons of explosives and artillery shells left lying around Iraq after Saddams government was defeated in 2003, and there are more wireless devices available (from toys, garage door openers and so on), roadside bombs have become the major danger to convoys today. The current gun trucks can still handle the old style ambushes. But the current foe prefers the roadside bomb, since the attacker is much less likely to take casualties.
The primary weapon against roadside bombs is patrolling (to find the bombs, or someone trying to plant them) and alertness on the part of the people in convoys. Most roadside bombs are either found by patrols, or by convoys (before the bombs can go off.) Some roads are so well patrolled that the bombers dont even bother trying to place them anymore. But there are thousands of kilometers of roads used by convoys, and not all can be patrolled intensely enough to find all the bombs, and discourage all the bombers.