Australian commandos could work alongside soldiers from the feared Iranian Quds forces in the battle against the Islamic State group in Iraq, Defence Minister David Johnston has said.

Senator Johnston said the crisis created by the Islamic State's brutal capture of vast tracts of territory was sufficiently acute that differences should be put aside in the common interest of stopping their reign of terror.

The government is deploying airforce personnel and special military advisers to the Middle East.

His remarks came as the government revealed that Australians were continuing to join extremist groups such as the Islamic State either as fighters or supporters, with the total now reaching about 185.

Senator Johnston, when asked whether Australia's commandos, who will advise and assist Iraqi forces, would work alongside Iranians, told Sky News: "They may be. I don't see a problem in that, given the nature of the threat."