Probably not related, but:
Russia has been a stalwart supporter of the terrorist-supporting Iran. And now Russia is facing their own terrorists. When you sleep with the dogs, don’t be surprised when you wake up with fleas!
Russia has been facing their own and other Islamic terrorists long before we faced 'em at Tripoli.
You’re ignoring the Sunni/Shia divide when you write that: Russia only has problems with Sunni terrorists. In general, Islamic terrorism is Sunni (Al Qaeda, the Muslim Brotherhood, and the various Central Asian terrorist groups, plus the not-actively-terrorist Hizb ut Tahrir, are all Sunni and exist because of the anomie created by the destruction of the Caliphate by the New Turks in the 1920’s). And Sunni terrorism is directed against the whole non-Sunni world, draws upon a much larger population, and (thanks to the Saudis following a “pay and point” strategy in keeping their monarchy from being overthrown) is much better financed.
Shi’ite terrorism, by contrast, is narrowly focused against Israel (Hebzollah in Lebanon) and (thanks to the Shah of Iran having been one of “our bastards” during the Cold War) the U.S.
The bombings in Russia are not blowback from support of Iran. In the long run the terrorists plaguing Russia are also enemies of the Iranian regime since the Iranian regime is Shi’ite.