NATO Major Jason Waggoner confirmed the event and said that the gunman was shot and killed. The shooting happened in Camp Bastion in Helmand province. The Briitish built the base which accomodates about 21,000 people.
According to a spokesperson for the province.British soldiers made a remark to an Afghan guard. They told the guard that he had incorrectly patted down an individual at the gate. The guard in response pointed his machine-gun and shot dead the two soldiers who had made the remark.
While tensions between Afghans and NATO troops was already high it is even higher since the Kandahar massacre that killed 17 civilians. Afghan army personnel and police recruited by the Taliban has so far killed 20 NATO soldiers. However in cases such as this one suspects the killing was simply an angry response to an insult. For more see this article.
NOTE: Some reports talk of a gunman in an Afghan army uniform rather than specifically identifying a guard as the shooter.