Foreign Minister Marise Payne has denied Australia is being dragged into a broader conflict against Iran by Donald Trump, as it joins a United States-led mission to keep shipping lanes open in the Middle East.

Key points: Foreign Minister Marise Payne says Australia is not being dragged into the US dispute with Iran

Foreign Minister Marise Payne says Australia is not being dragged into the US dispute with Iran Senator Payne maintains Canberra has a good relationship with Tehran

Senator Payne maintains Canberra has a good relationship with Tehran Iran and online extremism to be discussed at G7 summit in France

Last week, Prime Minister Scott Morrison announced Australia would commit a warship, a surveillance plane and defence planning personnel to the international efforts to keep ships travelling through the Strait of Hormuz.

Mr Morrison said a significant amount of Australia's crude and refined oil travelled through the region, and it was in the "national interest" to join the United States, the United Kingdom and Bahrain in policing the area.

Tension in the region increased when the UK seized an Iranian oil tanker off Gibraltar, prompting Iran to retaliate by seizing a British tanker in the Persian Gulf.

Critics of the plan to protect ships have suggested the mission is being used by the United States as a proxy for further pressure on Tehran, after Mr Trump pulled out of the Iran nuclear deal brokered by his predecessor Barack Obama last year.

Senator Payne argued the two issues were "quite separate" and maintained Australia stood by the Iran nuclear deal as the best option for the region, even if the US had abandoned the pact.

"Those issues for the United States are ones for them, but we are supporting our national interests, advancing our national security, as Australians would expect their Government to do," Senator Payne told the ABC's Insiders program.

Foreign Minister Marise Payne says Australia stands by the Iran nuclear deal, even if her US counterpart Mike Pompeo does not. ( AP: Rick Rycroft/ Pool )

"I wouldn't say we're at odds [with the US], every country makes their own decisions.

"Just because we're not making a similar decision doesn't mean we're at odds."

Senator Payne was grilled as to whether the Coalition supported the United States campaign of 'maximum pressure' against Tehran, and suggested Australia favoured diplomacy over the aggressive rhetoric delivered by Mr Trump.

"We have a very good working relationship with the Iranians," she said.

"We talk to them regularly, we have an embassy in Iran, which is something that not many other countries are able to say."

Space to play or pause, M to mute, left and right arrows to seek, up and down arrows for volume. Watch Duration: 1 minute 46 seconds 1 m 46 s Prime Minister Scott Morrison says Australia will join efforts to keep the Strait of Hormuz open for shipping

Concerns over Iran and violent online content raised at G7

Tensions over Iran will be among the issues discussed at this weekend's G7 summit in the French resort town of Biarritz, as leaders grapple with how to stop Tehran developing nuclear weapons.

Prime Minister Scott Morrison has been invited to the summit as an observer, and will continue to push world leaders to take action on blocking terrorist and extremist content on social media.

He was able to secure support at the G20 meeting in Osaka for greater scrutiny on internet companies sharing violent material, citing the Christchurch terror attack where a lone gunman live-streamed his shooting rampage.

A taskforce has recommended the Federal Government put in place clear rules about what content would be banned, and the e-Safety Commissioner will work with internet providers to establish how websites can be blocked quickly and effectively during any crisis event.

"It is very important that there's a legal basis to block access to those websites so Australians are protected against seeing that kind of abhorrent, violent and terrorist material," Communications Minister Paul Fletcher said.

The Federal Government said it would consider legislation to ban such content being shared online, if internet giants did not comply.

Labor backed the proposal in principle, but warned any rules needed to be carefully crafted.

"People don't get radicalised on their own, they do get radicalised in a community, and that is often online," Opposition home affairs spokeswoman Kristina Keneally told Sky News.

"But there is some risk here — I mean, some people in these chatrooms, they like the idea of getting banned.

"It's almost like a form of e-martyrdom."

French President Emmanuel Macron, who is hosting the G7 summit, hoped to have internet giants such as Google, Facebook and Snapchat sign a so-called "Charter for an Open, Free, and Safe Internet" on Friday.

That is now expected to happen on Monday.