Foreign Minister Julie Bishop has said the deal will help both countries in their efforts to tackle Islamic State (IS).
She added that Australia would have access to information gathered by Iranian operatives in Iraq.
Ms Bishop spoke after her meeting with President Hassan Rouhani, during her first visit to Iran.
About 100 Australians are believed to have travelled to Iraq and Syria to fight with IS, with authorities warning they present a serious threat to domestic security.
There are also concerns about supporters of IS and other radical groups within Australia.
At the weekend, five teenagers were arrested over an alleged plot to carry out an attack at a World War One centenary event.
‘Informal arrangement’
Ms Bishop said Australia had begun looking into the idea of sharing some information with Iran in 2014.
The issue became more pressing after a 17-hour siege in December, when Iranian refugee Man Haron Monis took 18 people hostage in a Sydney cafe.
Police stormed the building, but hostages Tori Johnson, 34, and Katrina Dawson, 38, were killed, along with Monis.
Monis has not been found to have had any links to known terror groups and was not on a watch list at the time of the siege.
Ms Bishop said on Sunday that the arrangement with Iran would be beneficial in the fight against terrorism.
“It was an informal arrangement whereby we would share intelligence that would give us information on the Australians who are taking part,” ABC News quoted her as saying.
“I believe that Iran has information that we would seek and they were very agreeable to share that information with us.”
Australia is part of the international force fighting against IS. Iran, though not in that coalition, is thought to be heavily involved in the fight against IS in Iraq.
In March, Iranian-backed Shia militiamen helped Iraqi government forces launch a major offensive to retake the Iraqi city of Tikrit from IS militants.
Iranian military advisers, led by Gen Qasem Soleimani of the Revolutionary Guards’ Quds Force, initially helped co-ordinate the operation.