One significant use of the Internet of Things (IoT) that is changing the face of industrial advancement is the Industrial Internet of Things (IIoT), which improves transparent communication across various items like hubs, developed facilities, and packing facilities. The IIoT can more efficiently analyze obtained data by incorporating data science approaches, which, IIoT systems require. Anomalies and assaults on networks pose a serious security risk for IIoT. In this study, a controller IoT device is chosen to calculate the expectations of IoT devices in order to avoid fraudulent devices from joining the network. Furthermore, implementing a blockchain-based data paradigm promotes data transparency. The suggested system's efficacy is rigorously tested using MATLAB against attack strength, message tampering, and fake authorization probability. The results of experiment indicate that the suggested technique improves IIoT network safety by recognizing hostile network threats.