Internet of Things (IoT) is widely used in industry, residential, and commercial sectors, and it is inevitable that IoT will continue to surround and enhance our everyday lives. Recently, IoT botnets became an increasingly destructive weapon against the Internet domain. Malware such as Mirai and Reaper have affected many industries and devices throughout the world. This paper provides a cohesive solution to protect consumer IoT devices using a cloud-based machine learning infrastructure with a dynamic on-site firewall.