The law allows you to shoot anyone who is trespassing on your property (which is absolutely terrifying). It’s not specific to illegal immigrants and couldn’t be used on someone else’s property. So shooting a rancher on their property would still be illegal.
One of the key reasons for Israeli airport security efficiency is racial profiling though (see the Ben Gurion airport section of This page for details).