The soldier was standing guard alone outside the ambassador's building in western Vienna overnight when the attacker confronted him with a knife, a police spokesman said early Monday.
The soldier tried to disarm the attacker with pepper spray before opening fire at least four times, police spokesman Harald Soeros said. The motive for the attack was not clear.
"We have asked the Austrian government to look into the issue as soon as possible, and pay more attention to the protection of Iranian diplomatic locations in that country".
Police have ordered reinforcements around all diplomatic missions in the Austrian capital, which is also home to many global organisations.
MI shipped out to West Region, will play Montana in Wichita
How they falter: Bridges and Ward's up-close and personal style backfires, and their scrappiness puts them in foul trouble early. The Tar Heels finished the season with a 25-10 record and lost in the ACC title game.
He also said he has contacted the Iranian ambassador in Austria.
The guard suffered a wound to his upper arm in the attack, which took place just before midnight in a residential area of the capital.
According to the Islamic Republic News Agency, IRNA, British police did nothing to protect the compound during the attack.
Police have ordered reinforcements around all diplomatic missions in the city.