Iran can still sell its oil at a profit on the black market, whereas the Russians are at a point where they cannot fund their military from the proceeds of their oil sales internationally.
Iran, the arsenal of anarchy.
Russia tax revenue 56 trillion rubles. Russia military budget 14 trillion rubles.
They certainly have other spending that eats into the 56 trillion rubles, but the military alone is obviously covered. As it is with the US discretionary portion of the budget at $890B, as part of $2T deficit.
As for oil and gas, it is managed by the various firms Rosneft, Gazprom, Lukoil and a few others. They are part of that tax revenue above from the mineral extraction tax as well as tax on their corporate operations/profits.
This is how it works in the US, too, btw. There is oil royalty from the relevant states that US oil companies have to pay.