The world witnessed a pandemic that needs to be limited. COVID-19 is a disease that spreads among people when an infected person is in close contact with another. To decrease the virus spreading, World Health Organization (WHO) imposed precautionary measures and suggested some rules to be followed such as social distancing and quarantining the infected people. We propose a model, using D2D and IoT technology, for tracking infected persons with COVID-19 and its proximity. If a person (mobile device) gets close to an infected person, he will also get infected, so by continuous moving, the infection will be transmitted. Thus, identifying the infected persons and their contacts will limit the spread of the disease. In each scenario, it is possible to distinguish the number of infected people and know from whom they are infected, and the location of the infection. The simulation shows the tracking of a mobile device when proximate infected person at a distance of 3 meters. As a result, our proposed D2D model is effective, especially in the scenario which found the infected person with COVID-19, tracks them, determines minimum distances, and recognizes the source of the infection. Thus, the model can limit the rapid spread of COVID-19 as it determines the 3meters distance from infected person and send precaution messages to the network.