'US troops killed' in Afghan attack
Several others were wounded in the attack at a remote military base in eastern Afghanistan.
Afghan officials told the the gunman was either a member of the local police or an insurgent posing as one.
Last year more than 60 Nato troops were killed by rogue members of the Afghan security forces.
Afghan officials said the shooting happened in Wardak province, where the Afghan government had demanded the withdrawal of US special forces over allegations of disappearances and torture by Afghan troops working with them, BBC reported.
Earlier on Monday, police in the Afghan capital Kabul said two civilian lorry drivers were killed and one wounded when they were fired on by an Isaf convoy.
Isaf said soldiers opened fire to protect themselves when the two drivers failed to comply with a warning from the convoy.
The latest deaths come amid continuing tension between the Afghan government and the US, as Nato troops prepare to end combat operations next year.
Afghan President Hamid Karzai has been strongly critical of US and allied forces for causing civilian casualties.
So-called "insider attacks" by members of the Afghan security forces or insurgents posing as them account for a growing proportion of Isaf casualties.