The coronaviruses are a deadly family of epidemic viruses that can spread from one individual to another very quickly, infecting masses. The literature on epidemics indicates that the early diagnosis of a coronavirus infection can lead to a reduction in mortality rates. To prevent coronavirus disease 2019 (COVID-19) from spreading, the regular identification and monitoring of infected patients are needed. In this regard, wireless body area networks (WBANs) can be used in conjunction with machine learning and the Internet of Things (IoT) to identify and monitor the human body for health-related information, which in turn can aid in the early diagnosis of diseases. This paper proposes a novel coronavirus-body area network (CoV-BAN) model based on IoT technology as a real-time health monitoring system for the detection of the early stages of coronavirus infection using a number of wearable biosensors to examine the health status of the patient. The proposed CoV-BAN model is tested with five machine learning-based classification methods, including random forest, logistic regression, Naive Bayes, support vector machine and multi-layer perceptron classifiers, to optimize the accuracy of the diagnosis of COVID-19. For the long-term sustainability of the sensor devices, the development of energy-efficient WBAN is critical. To address this issue, a long-range (LoRa)-based IoT program is used to receive biosensor signals from the patient and transmit them to the cloud directly for monitoring. The experimental results indicate that the proposed model using the random forest classifier outperforms models using the other classifiers, with an average accuracy of 88.6%. In addition, power consumption is reduced when LoRa technology is used as a relay node.