If I were the Iranian commander I would realize that a direct confrontation with the west would not go well. I would strive to continue defying the West in the hopes that they, not us, would fire the initial shots, providing Iran forces the political high ground to conduct operations in our own defense.
Prior to the initiation of hostilities, I would greatly increase my support for insurgent forces in Afghanistan, Iraq, Lebanon, and Pakistan. I would mass forces on the Afghanistan border, making it clear that I would invade in the event of an attack upon our soil. The Basij would be used to defend Iran and as follow on forces for this invasion. I do not expect a western land force to step foot upon Iranian soil, at least initially, so I feel confident that these forces can provide security while regulars from the IRIA man defensive batteries. IRIAF forces would begin armed air patrols of this border with the mission of shooting down drones detected in the area.
Western forces, already being drawn down, would be forced to vacate forward bases to reinforce the cities. This would provide initial morale boosts to insurgent forces already in Afghanistan. Reinforcement avenues into Afghanistan would challenge the supply requirements of NATO forces engaged in a full scale war in this region.
Increasing support for insurgent forces attacking Pakistan could be very counterproductive. You cannot control those forces and if they appear too strong will push Pakistan back toward the US. Worse, if you are caught at it Pakistan may even feel a need to
ally themselves with the US for protection.
I would order my Kilo's far into the Arabia Sea and Indian Ocean. Should open hostilities commence, their mission would be to attack enemy supply ships en-route to Pakistani ports in the event Pakistan reopened the supply channels through their territory, or to attack U.S. flagged tankers. Blocking the strait would threaten the world supply of oil and forcing other nations to placed military assets into the region to protect their tankers. By attacking tankers outside the Gulf, the war is contained to U.S. and other allied nations without threat to neutral or friendly nations. Mines would be placed near Iranian ports and offshore oil facilities to offer some defense against attack by sea.
Confirming target identity before attack will have to be done visually using the periscope or binoculars, requiring your submarines to spend too much time at shallow depths or on the surface where they are too vulnerable to detection from the air. The majority of the tanker traffic crossing the Indian Ocean is carrying oil to China, with India in 2nd place, both countries you don’t want to annoy by accident.
A better choice would be to attack tankers entering the Gulf of Aden or travelling south along the cost of Africa as these all would be carrying oil to Europe or the US.
Naval Surface forces would be placed in protected harbors with minimal crew, using its defenses to augment land defenses. Western Naval assets would be too powerful to allow their operation in open water. Missile boats would be used for dash attacks from smaller facilities and hidden coves.
I assume by ‘Missile boats’ you are referring those small boats Iran has advertised with multiple rocket launchers mounted above the pilot house. The ships mounting the larger anti-ship missiles are probably being continuously tracked and targeted for immediate destruction if the shooting starts. So remove the missiles from the launchers and replace them with mockups, then convert the missiles into truck mounted coastal artillery.
Also, it is quite likely that Iran will have vessels with the anti-piracy patrols when the shooting starts. They should be carefully instructed to immediately declare themselves neutral and request to be allowed to continue their duty to suppress piracy (and displacing toward India to be clear of the conflict zone) with teams of international observers on board to guarantee their good behavior. Those vessels are not capable enough to do more than die in an uninspiring fashion, but by remaining on patrol suppressing pirates they could generate favorable press, especially in south-east Asia, and drive the US planners nuts.
Missile based air defenses would be moved to protect coastal facilities with air assets moved to bases further inland to provide more reaction time and to support the Afghanistan invasion. Land based Anti-Ship missiles would be used to harass U.S. and allied forces in the Gulf, and against CLEARLY identified tankers flagged to these countries. The point here is NOT to threaten the world oil supply transiting the gulf or damage to the oil facilities. Only to threaten and destroy those assets belonging to actual participants in attacks upon Iran.
Moving the missile based air defenses to the coast just makes them easier for the allied forces to destroy. Instead move them inland along with the air assets to protect each other. If the air assets are of any value the allied forces planners will want to destroy them and you can force a battle inside your ground based air defense zone.
If attacked directly, Iran could achieve initial air superiority in Afghanistan to support a massive armor ground assault against Zanarij, Farah, Shindand, and Herat. Emphasis would be the capture and control of the main highway leading to Khandahar City and then moving North toward Kabul, with the further goal of isolating NATO from any Pakistani supply lines. Insurgent forces would be encouraged to harass NATO and Afghan forces in the mountain regions in the center and North; again with emphasis on disrupting supply conduits. Long range missile attacks would be initiated against supply centers within the country, but NOT against Arab neighbors, unless they provide basis for attacking forces. I would try to limit these attacks against these military bases, and not the oil facilities there.
Even if the US has only 2 carriers in the Gulf, any Iranian air superiority will be fleeting unless you can get Pakistan to join you (extremely unlikely). After that your invasion force becomes a
target rich environment.
You are also talking about running logistics (which Iran may not have available) to support an armored assault through at least 500 miles of hostile countryside using at most 2 or 3 unpaved roads. The local insurgents are anti-foreign invader, not anti-US, Sunni, and loath Persians. They will probably be happier to ambush your supply columns than the Allied ones.
Finally, your plan seems to be to surround and force the surrender of the US forces in Afghanistan. That would be very unwise, not the least because if you win the effects will be to inflame rather than cow the US public. However, you are far more likely to end up in a situation like Germany after the Battle of the Bulge with your own forces cut off from supply, surrounded by fresh US forces, and forced to surrender. Better to leave a way out and encourage a rapid retreat than a fight to the death.
To place further pressure on Western troops, threats would be made against Turkmenistan, while offering concessions to Pakistan for remaining neutral.
Given current poor relations between Iran and Turkmenistan, and the defensive nature of the geography, threats to them would probably be counterproductive.