Iran has threatened to retaliate, including by striking U.S. bases, if Washington launches an attack on the country.