Israel has a lot of nukes (while they pretend they don't) and that does not prevent them from being attacked.
This is part of why we help defend Israel, to constrain wars to conventional means.
In the first Gulf War, we placed the Patriot batteries around Israel, as they said that if an Iraqi biological or chemical SCUD attack hit Tel Aviv, they would vitrify Baghdad.
Having nukes doesn't prevent _anyone_ from attacking you, but it does constrain those attacks to conventional means. And what if you pulled off a decapitation attack against Tel Aviv? Well their fleet of nuclear capable subs would make you pay.
Thanks for pointing this out. I hear people say this over and over, if Iran only had nukes it would be safe to continue propagating terrorism as it has been doing. It’s obviously wrong, as you point out. Russia has nukes. India has nukes. Having nuclear weapons doesn’t mean you can do whatever you want, if anything it brings a higher level of scrutiny. A nuclear Iran would be a serious problem for many and that’s why it’s so critical to make sure that doesn’t happen, not just for Israel but the entire planet.
My totally unsubstantiated conspiracy theory is that several of those are sitting in shipping containers in the US and Europe, and that is part of the reason that their interests drive all western foreign policy, despite their open hostility to their 'allies'.
It probably prevents armed warships from attacking them. It doesn't, as you correctly point out, prevent guerilla warfare.