About $18 million worth of sophisticated U.S. weaponry and electronic equipment being illegally exported to communist or other "unfriendly" nations has been recovered by federal agents, the Dallas Morning News reported today.

In a copyrighted story, the newspaper quoted federal agents as saying the equipment, including lasers and computer components, had been earmarked for the Soviet Union, Iraq, Iran, Libya and other "unfriendly" countries before it was confiscated during the past three months.

The crackdown, called "Operation Exodus," involved interception of illegal exports at 12 ports by 175 U.S. Customs Service agents, project director Patrick O'Brien told the newspaper.

The Reagan administration ordered the interception of the restricted-export items, he said. Agents are conducting 40 criminal investigations involving at least that many U.S. companies, O'Brien said.

After establishing a project command center in Washington, agents spent last winter gathering intelligence and began seizing the items in March, O'Brien said.

He said $6 million worth of goods was seized in March alone. "I never expected us to seize that high amount this quickly," he said.

Customs officials identified 11 of the ports designated for the project as Houston; Los Angeles; Boston; Chicago; Detroit; Newark; Norfolk; Champlain, N.Y.; Dulles International Airport outside Washington, D.C.; San Francisco and New York City.

Sources who asked not to be identified said the 12th port could not be identified, but one man was arrested at Dallas-Fort Worth Airport in connection with the operation, the newspaper said.

One seizure involved $1.5 million in computerized mapping equipment destined for Czechoslovakia through Houston and Los Angeles, he said.

The airborne-scanning equipment was purchased from an Anaheim, Calif., company, which Customs Service agents would not name. Some of the equipment then was shipped from Los Angeles to Mexico City and loaded aboard a Dutch airliner, the newspaper reported.

The mapping equipment, identified as photography supplies, was scheduled to be flown to Zurich and then to Czechoslovakia, the newspaper quoted a source close to the investigation as saying. But customs agents in Los Angeles who learned of the plan seized part of the shipment, then alerted Houston officials, who met the Dutch airliner when it landed there and seized another 11 crates of equipment valued at $275,000.

Federal officials were able to monitor the progress of the shipment after it arrived in Zurich, the source said. Indictments are expected against two West Coast men and some foreign citizens within three weeks.

So far, 258 other shipments have been seized. In six of them, Houston agents confiscated restricted export items valued at about $1.1 million.

A British man, identified by the newspaper as weapons broker James Welsh, was arrested by customs agents late Wednesday at Dallas-Fort Worth Airport with $40,000 worth of Sikorsky helicopter parts in his luggage and charged with attempted smuggling, officials said. Welsh has denied the charges.