The farmers of agricultural farms manage and monitor different types of livestock. The manual inspection and monitoring of livestock are tedious since the cattle do not stay at fixed locations. Fencing many cattle requires a considerable cost and involves farmers’ physical intervention to keep an eye to stop them from crossing beyond the access points. Visual tracking of livestock and fencing is a time-consuming and challenging job. This research proposes a smart solution for livestock tracking and geofencing using state-of-the-art IoT technology. The study creates a geographical safe zone for cattle based on IoT and GPRS, where the cattle are assigned dedicated IoT sensors. The cattle can be easily remotely monitored and controlled without having any need for farmers to intervene for livestock management physically. The smart system collects the data regarding the location, well-being, and health of the livestock. This kind of livestock management may help prevent the spread of COVID-19, lower the farming costs, and enable remote monitoring.