Mr Bolton said he had spoken with Mr Trump recently and said: "President Trump told me that if Iran does anything at all to the negative, they will pay a price like few countries have ever paid before".
Many U.S. allies in Asia, the Middle East and elsewhere have been trying to negotiate exemptions to the looming rules, but as of last week, they didn't appear to be getting far.
Israeli Prime Minister Benjamin Netanyahu praised the administration's tough stance.
Trump has alleged that the deal did not restrict Iran's "destabilising activities" in the region enough, and could not detect or prevent any breaking of its terms.
The statement from President Rouhani that set off Trump was a clear threat to the United States. The United States supports you.
That is when Trump announced his decision to withdraw the United States from a 2015 worldwide agreement over Iran's nuclear program.
Prominent Iranian analyst Seed Leilaz downplayed the war of words, describing it as "the storm before the calm".
Never threaten Iran! Source Iranian daily Iran
Leilaz says Trump and Kim got "closer" despite their previous warring words.
Rouhani's apparent warning on July 3 that Iran may disrupt oil shipments from neighbouring countries came in reaction to looming U.S. sanctions and efforts by the administration of President Donald Trump to force all countries to halt purchases of Iranian oil.
Within hours of Trump's tweet, Iran's state-owned news agency IRNA completely dismissed the tweet, saying that it is a "passive reaction" to President Rouhani's earlier remarks.
The Iran comments came in a wide-ranging speech to the VFW that included talk about national defense, trade policy and tariffs, North Korea, and attacks on the media.
The U.S. was a driving force behind the agreement under former President Barack Obama, but Trump has long taken issue with the accord, repeatedly calling it one of the "worst" deals he has ever seen.
Iran has rejected talks with the USA, and Mr Rouhani has accused the United States of stoking an "economic war".
Rouhani suggested that Iran has alternatives to shipping crude through Hormuz.More news: Woman shot dead amid stand-off at Los Angeles supermarket