The Mishnah (Bava Kama 7) explicitly prohibits Jews from raising sheep and goats in Israel. This is echoed in Rambam. However, in modern-day Israel, many frum Jews raise sheep and goats (especially in yishuvim) and obtain kosher certification and I have never heard this be questioned. Why?
1 Answer
Welcome to Mi Yodeya!
This very broad article deals with the issue well.
The main source he quotes is Shulchan Aruch Choshen Mishpat, 409:1.
אין מגדלים בהמה דקה בארץ ישראל מפני שדרכם לרעות בשדות של אחרים והיזקם מצוי אבל מגדלים בסוריא ובמדברות שבארץ ישראל והאידנא שאין מצוי שיהיו לישראל בארץ ישראל שדות נראה דשרי:
We do not raise a Behemah Dakah in Eretz Yisrael because their way is to go and eat in other's fields, and their damage is found. But we can do this in Syria and the deserts in Eretz Yisrael. And now that there are not many Jewish fields in Israel, we can do this.
Rav Melamed quotes a modern-day machloket whether this applies (that we can be Meikel because there are not many fields of Jews). He says that Rav Ovadya Yosef (Yabia Omer Part 3 Choshen Mishpat 7) and Rav Wosner (4, 227) say that nowadays we must be Machmir. However, he quotes Rav Tzvi Pesach Frank as disagreeing because there was a nullification at one point, which we can not change (i.e. start applying this Halacha again). He quotes others saying the same. All is in the article.