The Internet of Things (IoT) aims to connect physical objects for remote monitoring via the Internet. Given COVID-19's contagious nature, effective detection and prevention are essential. Our work introduces an IoT-based system to prevent individuals with suspected COVID-19 from accessing a facility. The system measures body temperature and checks for mask-wearing. If a high temperature or lack of a mask is detected, entry is blocked and an email notification is sent. This autonomous system minimizes human supervision, is cost-effective, and easily deployable in various settings. By integrating temperature measurement and mask detection, it offers a robust solution to prevent COVID-19 spread, ensuring public health and safety.