Overnight on Saturday, Taliban fighters fired rocket launchers and shells on the administrative headquarters in Zeelook district in the south-eastern province of Paktika, provincial police chief Dawlat Khan said.
"After firing on the district headquarters, infantry Taliban fighters engaged with government troops in an exchange of fire for nearly 20 minutes," he told Reuters news agency by phone. "Finally our troops managed to defeat them and push them back."
Khan had no information on casualties.
Rumsfeld was flying in from the Gulf on Sunday, for talks with President Hamid Karzai and to meet US troops there.
His visit coincides with a rise in attacks by the resurgent Taliban militia, ousted from power in Kabul in late 2001. It comes days after one of the biggest battles in Afghanistan for at least 18 months in which more than 80 Taliban rebels were said to have been killed.
Qalb al-Din Hekmatyar is seen as a
threat to the Karzai government
In the past month, there have been intermittent attacks in Paktika blamed on the Taliban as well as followers of Qalb al-Din Hekmatyar, an outlawed commander who has vowed to topple Karzai's government and drive foreign troops out of Afghanistan.
The latest attack in Paktika comes days after hundreds of Afghan soldiers, backed by US-led forces, wound up an operation in the province in an attempt to track down rebels. Khan said the operation in Paktika had failed to make any significant arrests.
Further west in Zabul province, US and Afghan forces say they have killed more than 80 Taliban fighters in the past two weeks in a major ground and air offensive against the radical militia.
In May, Rumsfeld said most of Afghanistan was secure, and the United States had moved from a period of major combat operations to one of stabilisation and reconstruction.
Since then, the resurgent Taliban forces and allied rebels have staged almost daily attacks on government posts, aid workers and US-led forces.