Israel says it is ready to defend itself against retaliation for an attack on an Iranian consulate in Syria.