Israel and Iran have, since Iran became a religious dictatorship in the 1980s, been trying to infiltrate each other with spies, assassins and saboteurs. Israel has been very successful while Iranian efforts have largely failed. The main reason for this is the large number of Iranian Jews who fled Iran since the 1980s and brought their cultural awareness and language skills with them. There were very few Israelis willing to defect to Iran and help spy against Israel. In addition to their cultural knowledge and language skills the Iranian Jews brought with them links to Iranian Moslems back in Iran who were opposed to the religious dictatorship there and willing to work against the Iranian government (without necessarily knowing they were working for Israel.)
Iran has been trying, with increasing vigor to recruit people who can operate in Israel. The best prospects recently have been Arabs who are Israeli citizens, but the ones most likely to become Iranian spies are already being watched by Israeli intelligence. Iran has been having more success in southern Lebanon. This was largely because Israel pulled its troops out of south Lebanon in 2000. That gesture was supposed to have brought calm to the Lebanese border, and for six years it did. But it was also in 2000 that the Palestinians began a terror campaign against Israel itself and that led to more and more Israeli intelligence resources being devoted to counter-terrorism. After about four years that battle with the Palestinians was won but resources were not shifted back to Lebanon. The terrorist threat to Israel was still seen as the more important one, and continued to demand a priority on intelligence resources. Apparently no one made a big stink about the way intelligence work on southern Lebanon was deteriorating. The commanders in northern Israel thought they had the intelligence situation under control. There was a network of informants in southern Lebanon and plenty of air reconnaissance. But the Israelis missed the details of how Iran and Hezbollah were improving counter-intelligence (neutralizing enemy spies) there. The problems the Israelis encountered here were classic, and had happened many times throughout military history. It takes particularly strong leadership, at the top, to insure that a secondary theater (like the Lebanese border) stays sharp, while a more immediate threat (the Palestinian terrorism) is constantly demanding immediate attention. The Israelis not only had to reconsider how they ran their intelligence operations, but how they selected their senior military leadership. The guy at the top can make mistakes with long term consequences, and this was one of those examples of how that plays out.
Iran was unable to convert its counter-intelligence success in southern Lebanon into better performance across the border but has done major damage to Israeli espionage in Lebanon. Despite that Israeli intel is still working in Lebanon, although at higher cost to the Israelis. At the same time the Iranian Quds Force (which runs overseas terrorist and intel operations) has been frustrated and humiliated by its inability to come even close to matching Israeli espionage and sabotage operations inside Iran.
Encouraged by the successes in Lebanon Quds has been trying more vigorously to break into Israel. Most of their failures are kept secret, but some get publicized. For example in 2013 an Iranian expatriate in Belgium was arrested for trying, at the behest of Quds, to set up an espionage and sabotage network in Israel. Quds offered the guy a million dollars if he could help plan and carry out terror attacks inside Israel. This spy was arrested and insisted that he was the victim of an Iranian extortion scheme to force him to spy. Whatever the case Quds had failed again. What was interesting with this case was that the arrested man had a brother who worked for Iranian intelligence and helped arrange for Quds Force to meet and recruit his brother in Belgium. Despite many precautions, undertaken on the advice of his Quds Force handlers, the newly recruited spy was detected by Israeli counterintelligence and was observed taking photos of the main airport in Israel, the American embassy in Israel and at least one intelligence facility. Arrested in September 2013 while trying to leave Israel the Belgian-Iranian spy eventually, after prolonged interrogation, provided many details of his work for Quds Force.
Iranian efforts like this have been going on for most of the last decade. For example, back in 2007 Israel revealed an Iranian effort to recruit Israelis of Iranian origin to spy on Israel for Iran. Up until then Israel had detected at least ten Iranian attempts to recruit Israelis as spies. This was possible because, although Iran wants Israel destroyed, Iran still allowed Israelis of Iranian origin to return and visit kin in Iran. There are still about 8,000 Jews in Iran, and nearly 150,000 Israelis of Iranian origin. Since 1948 most Jewish Iranians have left Iran, most for Israel. Each year there are still some Israelis have returning to Iran to visit family. The classic method of recruitment, used by the Iranians, was to threaten kin in Iran with harm (imprisonment, torture, death) if the Iranian Jew who was now an Israeli did not supply information. Some of these Israelis reported the Iranian recruiting attempt to the Israeli government and that led to a more and more vigorous Israeli counterintelligence efforts against Iranian attempts to set up espionage and terror operations inside Israel.
It's not illegal for Israelis to travel to Iran, although it's common knowledge that Iran is not a hospitable place for Jews, Israelis or Westerners in general. Israelis usually go to the nearest Iranian embassy (usually Turkey) to take care of the paperwork. While applying for an Iranian passport, they are questioned on what they do for a living, and what they did while in the Israeli armed forces. Some Israelis have reported this to their government, and the Iranian espionage situation has been watched carefully for some time.
Because of this Israeli scrutiny Iran is now going after the many Iranians who have fled to the West in the last few decades and used threats or offers of money to recruit them as intelligence operatives. Iran seeks out expatriate Iranians who have been successful and legitimate international businessmen as this allows them to travel a lot without alerting Israeli counterintelligence.
Israel has been doing the same thing and has apparently been more successful at setting up espionage and sabotage operations in Iran. This has annoyed the Iranians a great deal, as has the Israeli skill at foiling Iranian intel and terror operations against Israel. This is a war that is far from over.