Major American businesses are preparing a retreat from Iran before President Trump's crushing sanctions take effect.

Trump's decision last month to exit the Iran nuclear deal -- and re-impose tough penalties on the nation's oil industry -- means US companies will draw the ire of Washington if they don't wind down their operations there.

The Obama administration's historic nuclear agreement with Iran in 2016 paved the way for General Electric (GE), Honeywell, Dover (DOV) and other companies to sell tens of millions of dollars' worth of equipment to Iran's aging energy industry. Under the terms of that deal, US companies were granted licenses to do business with Iran through foreign subsidiaries.

GE, for instance, reported nearly $25 million of revenue from Iran since 2016 between the parent company and its Baker Hughes (BHGE) division. That includes lucrative contracts to sell machinery and parts to Iran's gas plants and oil refineries.

But those transactions won't be possible beyond November 4, when the federal government expects to have re-imposed all nuclear-related sanctions on Iran.

Last month, the US Treasury Department instructed people engaged in previously allowed Iranian business dealings to "take the steps necessary to wind down" those activities "to avoid exposure to sanctions or an enforcement action under US law."

Related: Europe asks US to spare its companies from Iran sanctions

A person familiar with the matter told CNNMoney that GE plans to wind down its business in Iran by November 4. GE recently shut its very small Tehran office, in which the company had two or three people, the person said.

"We are adapting our activities in Iran as necessary to conform with the recent changes in US law," GE said in a statement.

GE has exposure to Iran on two different levels. First, there's GE Power, the struggling maker of parts for power plants. And then there's Baker Hughes, the oil services giant that GE merged its oil and gas business with last year.

GE recently reported in an SEC filing that its oil and gas businesses received a purchase order for valves and parts for industrial machinery and equipment used in gas facilities in Iran. The business led to $6.7 million in revenue being reported in the first quarter.

GE also landed another 10 orders in the first quarter for spare parts to support Iran's gas facilities.

Additionally, GE Power agreed to sell protection relays to an oil refinery in Iran as well as compressor and other parts to a petrochemical company there.

"GE's activities in Iran to date have been limited and in compliance" with federal rules, the company said.

Related: New Iran sanctions will kill billions in jet sales. Boeing is ready

Honeywell (HON), the maker of home thermostats, jet engines and dozens of other products, also signaled it will soon exit Iran.

In a statement, Honeywell said it will "continue" to "operate within the parameters of all applicable US and international regulations."

Honeywell generated about $58 million of revenue last year on sales of services and products that went to Iran's oil, gas and petrochemical industry, according to SEC filings.

Boeing (BA) has also been caught in the middle of the Iran sanctions. The aerospace giant is poised to lose out on billions of dollars in sales from deals to sell 110 jets to Iran Air and Iran Aseman Airlines.

Boeing did not respond to a request for comment.

Dover, which makes pumps, compressors and other systems, said in a recent filing that it expected to generate about $14 million by selling parts to Iran's oil, gas and petrochemical sector.

In a statement, Dover said its foreign subsidiaries currently sell products in Iran through waivers that the Trump administration has announced plans to revoke.

"Upon such revocation," Dover said, "those subsidiaries will cease making sales or providing services into Iran to fully comply with the US sanctions program."

At least one major insurance company is being forced to adapt to the looming penalties on Iran.

Chubb (CB), the world's largest publicly traded property and casualty insurer, does not have a physical presence in Iran. However, Chubb has been providing insurance to several marine cargo clients who were transporting oil and other products to and from Iran, according to SEC filings.

Chubb said in a statement that it will ensure "full compliance" with the Treasury Department's Iran sanctions.