The Internet of Things (IoT) brings together more devices that can communicate with one another while requiring little user input. IoT is one of the computer disciplines that is expanding rapidly, but the fact is that with the increasingly intimidating Internet world, IoT is susceptible to different kinds of cyberattacks. Practical defenses against this, including network anomaly detection, must be built to secure IoT networks. Attacks cannot be completely prevented forever, but practical defense depends on the ability to identify an attack as soon as possible. IoT systems cannot be protected by conventional high-end security solutions because IoT devices have a limited amount of storage and processing capability. This suggests the need for the creation of smart network-based solutions for cyberattacks, such as Machine Learning (ML). Although the application of ML methods in detecting attacks has numerous studies in recent years, attack detection in IoT networks has received less attention. The major goal of this study is to create and evaluate a hybrid ensemble algorithm called LNKDSEA (Logistic regression, Naïve Bayes, K-nearest neighbor, Decision tree, and Support vector machine-based Ensemble Algorithm). The proposed approach can efficiently identify IoT network attacks including DDoS, information gathering, Malware, Injection attacks, and Man-in-The-Middle- Attack. The edge-IIoTset dataset is used to evaluate the proposed model. During the implementation stage, the proposed technique is evaluated by employing binary and multi-class (6 and 15 Class) classifications of cyberattacks, and high performance is accomplished.