As more devices are connected to the internet to broaden their operational capabilities and pave the way for the Internet of Things, technology is advancing daily in the modern world (IOT). With their IOT connectivity, these IOT devices exchange the data they have gathered. There will be certain challenges as humanity advances into the future. Online security has emerged in order to provide or enhance security for various IoT-based devices and smart homes. Various architectures and technologies that aid in preventing or detecting these attacks are thoroughly described in this study. They include anomaly, signature, and machine learning techniques. The performance of the techniques, tools, benefits, and limitations are compared and contrasted.