Anthony Cordesman describes the avenues for Iranian-retaliation in the event of an American attack:
1) Iranian retaliation against US forces in Iraq and Afghanistan using Shahab-3 missiles armed with CBR warheads; 2) using proxy groups including...Sadr in Iraq to intensify the insurgency and escalate the attacks against US forces and Iraqi Security Forces; 3) turning the Shi'ite majority in Iraq against the US presence and demanding US forces leave; 4) attacking the US homeland with suicide bombs by proxy groups or delivering CBR weapons to al-Qa'ida to use against the US; 5) using its asymmetric capabilities to attacks US interests in the region including soft targets: e.g. embassies, commercial centers, and American citizens; 6) attacking US naval forces stationed in the Gulf with anti-ship missiles, asymmetric warfare, and mines; 7) attacking Israel with missile attacks possibly with CBR warheads; 8) retaliating against energy targets in the Gulf and temporarily shutting off the flow of oil from the Strait of Hormuz; and 9) stopping all of its oil and gas shipments to increase the price of oil, inflicting damage on the global and US economies.
One of the slightly atypical dynamics of the Iraq War is that the enemy can't really hurt us. It can hurt our ability to occupy Iraq, but unless the jihadists we're training over there decide to refocus their efforts -- which they may well do one day, in which case we'll have created them over there to fight them over here -- the majority of the damage they inflict is localized to our mission in Iraq.
Iran, by contrast, can do us a lot of damage. It's much larger and richer than Iraq, with a much more mature global presence. Additionally, it can unleash hell within Iraq, where our presence vastly enhances Iran's ability to battle us asymmetrically. Americans are used to invading and bombing countries like Bosnia and Iraq -- it's been a long time since we've struck someone who can strike back. For that reason, there's very little talk of the consequences of bombing within the media. You hear a lot about whether such an attack would be effective, but very little about the likely aftermath, and thus almost no serious discussion as to whether a military attack would be worth it. We're simply used to evaluating American military actions as if there will be no retaliatory consequences. And that's very dangerous, and in this case, very untrue.
(via)